Namhyung Kim
4b94f5b7b4
tracing: Add hist trigger 'log2' modifier
Allow users to have numeric fields displayed as log2 values in case
value range is very wide by appending '.log2' to field names.
For example,
# echo 'hist:key=bytes_req' > kmalloc/trigger
# cat kmalloc/hist
{ bytes_req: 504 } hitcount: 1
{ bytes_req: 11 } hitcount: 1
{ bytes_req: 104 } hitcount: 1
{ bytes_req: 48 } hitcount: 1
{ bytes_req: 2048 } hitcount: 1
{ bytes_req: 4096 } hitcount: 1
{ bytes_req: 240 } hitcount: 1
{ bytes_req: 392 } hitcount: 1
{ bytes_req: 13 } hitcount: 1
{ bytes_req: 28 } hitcount: 1
{ bytes_req: 12 } hitcount: 1
{ bytes_req: 64 } hitcount: 2
{ bytes_req: 128 } hitcount: 2
{ bytes_req: 32 } hitcount: 2
{ bytes_req: 8 } hitcount: 11
{ bytes_req: 10 } hitcount: 13
{ bytes_req: 24 } hitcount: 25
{ bytes_req: 160 } hitcount: 29
{ bytes_req: 16 } hitcount: 33
{ bytes_req: 80 } hitcount: 36
When using '.log2' modifier, the output looks like:
# echo 'hist:key=bytes_req.log2' > kmalloc/trigger
# cat kmalloc/hist
{ bytes_req: ~ 2^12 } hitcount: 1
{ bytes_req: ~ 2^11 } hitcount: 1
{ bytes_req: ~ 2^9 } hitcount: 2
{ bytes_req: ~ 2^6 } hitcount: 3
{ bytes_req: ~ 2^3 } hitcount: 13
{ bytes_req: ~ 2^5 } hitcount: 19
{ bytes_req: ~ 2^8 } hitcount: 49
{ bytes_req: ~ 2^7 } hitcount: 57
{ bytes_req: ~ 2^4 } hitcount: 74
Link: http://lkml.kernel.org/r/7ff396b246c6a881f46b979735fddf05a0d6c71a.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>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-19 18:56:03 -04:00
..
2016-03-22 15:36:02 -07:00
2016-03-08 15:28:30 -05:00
2016-03-24 10:52:25 -07:00
2016-04-19 12:16:14 -04:00
2016-04-19 12:16:14 -04:00
2016-02-05 02:38:02 +01:00
2015-11-03 16:19:02 -05:00
2015-11-25 15:24:05 -05:00
2015-11-02 13:34:58 -05:00
2014-05-29 22:49:54 -04:00
2015-10-21 10:10:09 -04:00
2015-05-12 15:56:57 -04:00
2015-03-25 08:57:22 -04:00
2016-01-12 20:04:15 -08:00
2016-03-08 11:19:29 -05:00
2016-04-19 18:56:03 -04:00
2016-04-19 18:56:00 -04:00
2016-04-19 12:16:14 -04:00
2015-11-02 14:28:05 -05:00
2016-03-25 16:37:42 -07:00
2016-03-08 11:19:08 -05:00
2016-03-18 16:39:11 -04:00
2015-09-30 15:22:55 -04:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-08 11:23:57 -05:00
2016-03-22 18:04:10 -04:00
2015-09-28 10:16:12 -04:00
2016-03-22 18:02:40 -04:00
2016-03-22 15:36:02 -07:00
2015-09-22 13:11:30 -04:00
2015-10-06 17:08:15 +02:00
2015-11-06 13:30:20 -08:00
2014-10-12 07:28:55 -04:00
2015-02-13 21:21:37 -08:00
2016-02-19 12:36:44 -05:00
2016-03-22 15:36:02 -07:00
2016-03-24 10:52:25 -07:00
2016-03-22 15:36:02 -07:00
2016-04-19 18:56:03 -04:00
2016-04-19 18:56:00 -04:00
2016-04-19 12:16:06 -04:00
2016-04-19 12:16:06 -04:00