Re: [PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer
From: Baolin Wang
Date: Thu Oct 27 2016 - 03:32:17 EST
Hi,
On 18 October 2016 at 14:47, Baolin Wang <baolin.wang@xxxxxxxxxx> wrote:
> For system debugging, we sometimes want to know who sets one
> alarm timer, the time of the timer, when the timer started and
> fired and so on. Thus adding tracepoints can help us trace the
> alarmtimer information.
>
> For example, when we debug the system supend/resume, if the
> system is always resumed by RTC alarm, we can find out which
> process set the alarm timer to resume system by below trace log:
>
> ......
>
> Binder:3292_2-3304 [000] d..2 149.981123: alarmtimer_cancel:
> alarmtimer:ffffffc1319a7800 type:REALTIME
> expires:1325463120000000000 now:1325376810370370245
>
> Binder:3292_2-3304 [000] d..2 149.981136: alarmtimer_start:
> alarmtimer:ffffffc1319a7800 type:REALTIME
> expires:1325376840000000000 now:1325376810370384591
>
> Binder:3292_9-3953 [000] d..2 150.212991: alarmtimer_cancel:
> alarmtimer:ffffffc1319a5a00 type:BOOTTIME
> expires:179552000000 now:150154008122
>
> Binder:3292_9-3953 [000] d..2 150.213006: alarmtimer_start:
> alarmtimer:ffffffc1319a5a00 type:BOOTTIME
> expires:179551000000 now:150154025622
>
> ......
>
> system_server-3000 [002] ...1 162.701940: alarmtimer_suspend:
> alarmtimer type:REALTIME expires:1325376839802714584
>
> ......
>
> From the trace log, we can find out the 'Binder:3292_2' process
> set one alarm timer which resumes the system.
>
> Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxx>
> Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
> ---
> Changes since v3:
> - Remove the "ALARM_" prefix in the string.
> - Add the ACK by Steven Rostedt.
>
> Changes since v2:
> - Save time as s64 type.
> - Remove 'process_name' parameter and add 'now' parameter.
> - Rename the trace event name.
> - Remove restart trace event.
> - Other optimization.
Any comments about this version? Thanks.
--
Baolin.wang
Best Regards