aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorWang Nan <[email protected]>2017-12-04 16:51:06 +0000
committerArnaldo Carvalho de Melo <[email protected]>2017-12-05 15:59:37 -0300
commit7fb4b407a1242dbc85ea3ed1be065dca8f9a6f5b (patch)
tree456f8de768c54049f294f386ee79ab4f5cd9cc5b /tools/perf/util/scripting-engines/trace-event-python.c
parent71f566a34986f4a86a8c546c7a36f70f0132b8a9 (diff)
perf mmap: Don't discard prev in backward mode
'perf record' can switch its output data file. The new output should only store the data after switching. However, in overwrite backward mode, the new output still can have data from before switching. That also brings extra overhead. At the end of mmap_read(), the position of the processed ring buffer is saved in md->prev. Next mmap_read should be end in md->prev if it is not overwriten. That avoids processing duplicate data. However, md->prev is discarded. So next the mmap_read() has to process whole valid ring buffer, which probably includes old processed data. Avoid calling backward_rb_find_range() when md->prev is still available. Signed-off-by: Wang Nan <[email protected]> Tested-by: Kan Liang <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mengting Zhang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions