]> git.baikalelectronics.ru Git - kernel.git/commit
perf evlist: Rename variable in perf_mmap__read()
authorWang Nan <wangnan0@huawei.com>
Wed, 27 Apr 2016 02:19:21 +0000 (02:19 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 6 May 2016 00:04:04 +0000 (21:04 -0300)
commit99340f98eb4ed142b7d1f017b04faf738bcd531e
tree731d887c8bae23eb0408dcfd2193bc2077f621ee
parentf94fec7c11cc5b7f0247e5e2fb2e5c325f26d1b6
perf evlist: Rename variable in perf_mmap__read()

In perf_mmap__read(), give better names to pointers. Original name 'old'
and 'head' directly related to pointers in ring buffer control page. For
backward ring buffer, the meaning of 'head' point is not 'the first byte
of free space', but 'the first byte of the last record'. To reduce
confusion, rename 'old' to 'start', 'head' to 'end'.  'start' -> 'end'
is the direction the records should be read from.

Change parameter order.

Change 'overwrite' to 'check_messup'. When reading from 'head', no need
to check messup for for backward ring buffer.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1461723563-67451-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c