Files
android_kernel_xiaomi_sm8450/arch/x86/include/asm
David Sharp 8be0709f10 tracing: Format non-nanosec times from tsc clock without a decimal point.
With the addition of the "tsc" clock, formatting timestamps to look like
fractional seconds is misleading. Mark clocks as either in nanoseconds or
not, and format non-nanosecond timestamps as decimal integers.

Tested:
$ cd /sys/kernel/debug/tracing/
$ cat trace_clock
[local] global tsc
$ echo sched_switch > set_event
$ echo 1 > tracing_on ; sleep 0.0005 ; echo 0 > tracing_on
$ cat trace
          <idle>-0     [000]  6330.555552: sched_switch: prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=bash next_pid=29964 next_prio=120
           sleep-29964 [000]  6330.555628: sched_switch: prev_comm=bash prev_pid=29964 prev_prio=120 prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120
  ...
$ echo 1 > options/latency-format
$ cat trace
  <idle>-0       0 4104553247us+: sched_switch: prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=bash next_pid=29964 next_prio=120
   sleep-29964   0 4104553322us+: sched_switch: prev_comm=bash prev_pid=29964 prev_prio=120 prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120
  ...
$ echo tsc > trace_clock
$ cat trace
$ echo 1 > tracing_on ; sleep 0.0005 ; echo 0 > tracing_on
$ echo 0 > options/latency-format
$ cat trace
          <idle>-0     [000] 16490053398357: sched_switch: prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=bash next_pid=31128 next_prio=120
           sleep-31128 [000] 16490053588518: sched_switch: prev_comm=bash prev_pid=31128 prev_prio=120 prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120
  ...
echo 1 > options/latency-format
$ cat trace
  <idle>-0       0 91557653238+: sched_switch: prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=bash next_pid=31128 next_prio=120
   sleep-31128   0 91557843399+: sched_switch: prev_comm=bash prev_pid=31128 prev_prio=120 prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120
  ...

v2:
Move arch-specific bits out of generic code.
v4:
Fix x86_32 build due to 64-bit division.

Google-Bug-Id: 6980623
Link: http://lkml.kernel.org/r/1352837903-32191-2-git-send-email-dhsharp@google.com

Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: David Sharp <dhsharp@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-11-13 15:48:40 -05:00
..
2011-12-05 17:17:24 +01:00
2008-10-22 22:55:23 -07:00
2009-01-29 14:16:51 +01:00
2011-08-29 13:44:12 -07:00
2012-03-28 18:11:12 +01:00
2012-03-28 18:11:12 +01:00
2012-09-19 17:26:08 +02:00
2012-05-08 14:08:44 +02:00
2012-07-20 16:18:58 -07:00
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:23 -07:00
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:23 -07:00
2011-02-14 12:08:28 +01:00
2008-10-22 22:55:20 -07:00
2011-05-02 17:24:48 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2012-03-28 18:11:12 +01:00
2010-02-16 21:22:26 -08:00
2008-10-22 22:55:20 -07:00
2011-04-18 09:26:48 -07:00
2012-03-20 21:48:30 +08:00
2009-08-27 00:35:56 +02:00
2011-11-11 10:22:55 +01:00
2008-10-22 22:55:20 -07:00
2010-10-26 16:52:08 -07:00
2012-06-25 13:48:30 +02:00
2011-02-23 22:27:52 +01:00
2008-10-22 22:55:23 -07:00
2012-10-03 21:33:53 +02:00
2009-06-13 15:37:30 +02:00
2008-10-22 22:55:23 -07:00
2011-07-22 14:39:50 +09:30
2011-05-24 14:33:35 +02:00
2010-06-09 11:12:36 +02:00
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2012-01-26 21:23:53 +01:00
2010-05-07 17:13:04 -07:00
2012-07-05 21:12:11 +02:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2010-11-01 15:38:34 -04:00
2008-10-22 22:55:20 -07:00
2009-02-02 23:27:09 +05:30
2011-03-15 15:34:15 -07:00
2010-02-12 09:42:39 -08:00
2011-03-18 10:39:30 +01:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2011-08-29 13:44:12 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2012-02-20 12:52:05 -08:00
2008-10-22 22:55:23 -07:00
2009-06-15 12:40:02 +02:00
2009-01-31 00:19:32 +05:30
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2011-03-23 19:47:18 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:23 -07:00
2011-06-05 21:30:32 +02:00
2008-10-22 22:55:20 -07:00
2012-09-21 17:18:44 -07:00