Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935056AbcJ0HcO (ORCPT ); Thu, 27 Oct 2016 03:32:14 -0400 Received: from mail-yb0-f177.google.com ([209.85.213.177]:34736 "EHLO mail-yb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934621AbcJ0HcL (ORCPT ); Thu, 27 Oct 2016 03:32:11 -0400 MIME-Version: 1.0 In-Reply-To: <6f08d03d1762e4e128cbe8fcbaf722bc583d29e5.1476772985.git.baolin.wang@linaro.org> References: <6f08d03d1762e4e128cbe8fcbaf722bc583d29e5.1476772985.git.baolin.wang@linaro.org> From: Baolin Wang Date: Thu, 27 Oct 2016 15:32:09 +0800 Message-ID: Subject: Re: [PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer To: Steven Rostedt , Ingo Molnar , John Stultz , Thomas Gleixner Cc: Baolin Wang , Mark Brown , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1883 Lines: 59 Hi, On 18 October 2016 at 14:47, Baolin Wang 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 > Acked-by: Steven Rostedt > --- > 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