summaryrefslogtreecommitdiffstats
path: root/net/mpls
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2016-03-03 12:54:53 -0600
committerSteven Rostedt <rostedt@goodmis.org>2016-04-19 18:55:00 -0400
commit79e577cbce4c4c2bf0d64ec315adb04eda40736b (patch)
treed23113ca6d30c229e2d2c00f91c1eb65193ac23f /net/mpls
parent69a0200c2e25d61c50091549d00cfeb426c258f5 (diff)
downloadblackbird-op-linux-79e577cbce4c4c2bf0d64ec315adb04eda40736b.tar.gz
blackbird-op-linux-79e577cbce4c4c2bf0d64ec315adb04eda40736b.zip
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 <tom.zanussi@linux.intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> [ Added (unsigned long) typecast to fix compile warning ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'net/mpls')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud