aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2018-11-05 21:23:40 +0100
committerArnaldo Carvalho de Melo <[email protected]>2018-12-17 14:58:03 -0300
commit94ad6e7e3606454498aeac1fdd1b9de5c1e6735a (patch)
tree00954eb7ea985e5053f7c1b53fc9c419a1316d4e /tools/perf/scripts/python/event_analyzing_sample.py
parent16c66bc167cc52992f66748aed7ac21396189457 (diff)
perf top: Use cond variable instead of a lock
Use conditional variable logic to synchronize between the reading and processing threads. Currently it's done by having mutex around rotation code. Using a POSIX cond variable to sync both threads after queues rotation: Process thread: - Detects data - Switches queues - Sets rotate variable - Waits in pthread_cond_wait() Read thread: - Detects rotate is set - Kicks the process thread with a pthread_cond_signal() After this rotation is safely completed and both threads can continue with the new queue. Signed-off-by: Jiri Olsa <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Namhyung Kim <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions