tools lib traceevent: Added support for __get_bitmask() macro
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 3 Jun 2014 03:20:16 +0000 (23:20 -0400)
committerJiri Olsa <jolsa@kernel.org>
Sat, 7 Jun 2014 21:33:37 +0000 (23:33 +0200)
commit473a778a2f2949972b52ad7fc61577f381f2d05e
tree17cbf62b89bcbc38b600027cc61eda50469a796b
parent49440828ad7b809e9d31f6108875e3b1e974690c
tools lib traceevent: Added support for __get_bitmask() macro

Coming in v3.16, trace events will be able to save bitmasks in raw
format in the ring buffer and output it with the __get_bitmask() macro.

In order for userspace tools to parse this, it must be able to handle
the __get_bitmask() call and be able to convert the data that's in
the ring buffer into a nice bitmask format. The output is similar to
what the kernel uses to print bitmasks, with a comma separator every
4 bytes (8 characters).

This allows for cpumasks to also be saved efficiently.

The first user is the thermal:thermal_power_limit event which has the
following output:

 thermal_power_limit:  cpus=0000000f freq=1900000 cdev_state=0 power=5252

Link: http://lkml.kernel.org/r/20140506132238.22e136d1@gandalf.local.home
Suggested-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Javi Merino <javi.merino@arm.com>
Link: http://lkml.kernel.org/r/20140603032224.229186537@goodmis.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/lib/traceevent/event-parse.c
tools/lib/traceevent/event-parse.h
tools/perf/util/scripting-engines/trace-event-perl.c
tools/perf/util/scripting-engines/trace-event-python.c