diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-02-14 18:45:21 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-02-20 13:51:08 -0500 |
commit | 1c347a94ca79ef89156c7ad5d3a44bb2320a7047 (patch) | |
tree | d66b06113205b4c23da74548f15dc13c2e129d1b /tools/perf/scripts/python/stackcollapse.py | |
parent | a3d86a4ad7e4cef6f04f722028916680b4f635cb (diff) |
tracing: Comment why cond_snapshot is checked outside of max_lock protection
Before setting tr->cond_snapshot, it must be NULL before it can be updated.
It can go to NULL when a trace event hist trigger is created or removed, and
can only be modified under the max_lock spin lock. But because it can only
be set to something other than NULL under both the max_lock spin lock as
well as the trace_types_lock, we can perform the check if it is not NULL
only under the trace_types_lock and fail out without having to grab the
max_lock spin lock.
This is very subtle, and deserves a comment.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions