aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2016-03-03 12:54:53 -0600
committerSteven Rostedt <[email protected]>2016-04-19 18:55:00 -0400
commit79e577cbce4c4c2bf0d64ec315adb04eda40736b (patch)
treed23113ca6d30c229e2d2c00f91c1eb65193ac23f /lib/mpi/mpiutil.c
parent69a0200c2e25d61c50091549d00cfeb426c258f5 (diff)
tracing: Support string type key properly
The string in a trace event is usually recorded as dynamic array which is variable length. But current hist code only support fixed length array so it cannot support most strings. This patch fixes it by checking filter_type of the field and get proper pointer with it. With this, it can get a histogram of exec() based on filenames like below: # cd /sys/kernel/tracing/events/sched/sched_process_exec # cat 'hist:key=filename' > trigger # ps PID TTY TIME CMD 1 ? 00:00:00 init 29 ? 00:00:00 sh 38 ? 00:00:00 ps # ls enable filter format hist id trigger # cat hist # trigger info: hist:keys=filename:vals=hitcount:sort=hitcount:size=2048 [active] { filename: /usr/bin/ps } hitcount: 1 { filename: /usr/bin/ls } hitcount: 1 { filename: /usr/bin/cat } hitcount: 1 Totals: Hits: 3 Entries: 3 Dropped: 0 Link: http://lkml.kernel.org/r/610180d6df0cfdf11ee205452f3b241dea657233.1457029949.git.tom.zanussi@linux.intel.com Cc: Tom Zanussi <[email protected]> Cc: Masami Hiramatsu <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Tested-by: Masami Hiramatsu <[email protected]> [ Added (unsigned long) typecast to fix compile warning ] Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions