Skip to contentSkip to conversation

time: alarmtimer: Add tracepoints for alarmtimers

tip:timers/core Ingo Molnar 3 participants 3 messages Sep 6, 2016 – Sep 7, 2016 1 message not in the archive Tracing

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · tip-bot for Baolin Wang
Commit-ID:  a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Gitweb:     http://git.kernel.org/tip/a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Author:     Baolin Wang <[email protected]>
AuthorDate: Mon, 22 Aug 2016 12:23:14 +0800
Committer:  John Stultz <[email protected]>
CommitDate: Wed, 31 Aug 2016 14:44:18 -0700

time: alarmtimer: Add tracepoints for alarmtimers

FYI, this commit causes a build failure on the S390 defconfig:

kernel/built-in.o:/home/mingo/tip/include/trace/events/alarmtimer.h:62: more undefined references to `rtc_ktime_to_tm' follow

Removing that commit solved the build failure. Other architectures (that I checked) build fine.

Thanks,

Ingo

#2 lore raw
Quoted 10 lines · Ingo Molnar
Quoted 7 lines · tip-bot for Baolin Wang
Commit-ID:  a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Gitweb:     http://git.kernel.org/tip/a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Author:     Baolin Wang <[email protected]>
AuthorDate: Mon, 22 Aug 2016 12:23:14 +0800
Committer:  John Stultz <[email protected]>
CommitDate: Wed, 31 Aug 2016 14:44:18 -0700
Quoted 8 lines
Quoted 1 line

time: alarmtimer: Add tracepoints for alarmtimers

FYI, this commit causes a build failure on the S390 defconfig:

kernel/built-in.o:/home/mingo/tip/include/trace/events/alarmtimer.h:62: more undefined references to `rtc_ktime_to_tm' follow

Removing that commit solved the build failure. Other architectures (that I checked) build fine.

Baolin: It looks like the issue is rtc_ktime_to_tm is defined in the CONFIG_RTC_LIB optional drivers/rtc/rtc-lib.c, which s390 does not include.

Something like (forgive the whitespace damage, as this was copied and pasted):

(quoted diff) +0 -0

b/include/trace/events/alarmtimer.h
index 6a34bc9..a4f78cc 100644

include/trace/events/alarmtimer.h +15 -0
@@ -77,6 +77,7 @@ DECLARE_EVENT_CLASS(alarm_processing,
                __string(name, process_name)
        ),
 
+#ifdef CONFIG_RTC_LIB
        TP_fast_assign(
                __entry->expires = alarm->node.expires.tv64;
                __entry->second = rtc_ktime_to_tm(alarm->node.expires).tm_sec;
@@ -89,6 +90,20 @@ DECLARE_EVENT_CLASS(alarm_processing,
                __assign_str(name, process_name);
        ),
 
+#else
+       TP_fast_assign(
+               __entry->expires = alarm->node.expires.tv64;
+               __entry->second = 0;
+               __entry->minute = 0;
+               __entry->hour = 0;
+               __entry->day = 0;
+               __entry->mon = 0;
+               __entry->year =0;
+               __entry->alarm_type = alarm->type;
+               __assign_str(name, process_name);
+       ),
+#endif
+
        TP_printk("process:%s alarmtimer type:%s expires:%llu "
                  "time: %hu-%u-%u %u:%u:%u",
                  __get_str(name),

Seems to resolve it, but I think a better solution is needed.

thanks
-john

#3 lore raw

Hi John and Ingo,

Quoted 11 lines · John Stultz
Quoted 10 lines · Ingo Molnar
Quoted 7 lines · tip-bot for Baolin Wang
Commit-ID:  a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Gitweb:     http://git.kernel.org/tip/a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021
Author:     Baolin Wang <[email protected]>
AuthorDate: Mon, 22 Aug 2016 12:23:14 +0800
Committer:  John Stultz <[email protected]>
CommitDate: Wed, 31 Aug 2016 14:44:18 -0700
Quoted 8 lines
Quoted 8 lines
Quoted 1 line

time: alarmtimer: Add tracepoints for alarmtimers

FYI, this commit causes a build failure on the S390 defconfig:

kernel/built-in.o:/home/mingo/tip/include/trace/events/alarmtimer.h:62: more undefined references to `rtc_ktime_to_tm' follow

Removing that commit solved the build failure. Other architectures (that I checked) build fine.

I am sorry for the build failure on S390. I will send out the new version to fix it ASAP. Thanks for John's help.

Quoted 45 lines

Baolin: It looks like the issue is rtc_ktime_to_tm is defined in the CONFIG_RTC_LIB optional drivers/rtc/rtc-lib.c, which s390 does not include.

Something like (forgive the whitespace damage, as this was copied and pasted):

include/trace/events/alarmtimer.h +15 -0
index 6a34bc9..a4f78cc 100644
@@ -77,6 +77,7 @@ DECLARE_EVENT_CLASS(alarm_processing,
                __string(name, process_name)
        ),
 
+#ifdef CONFIG_RTC_LIB
        TP_fast_assign(
                __entry->expires = alarm->node.expires.tv64;
                __entry->second = rtc_ktime_to_tm(alarm->node.expires).tm_sec;
@@ -89,6 +90,20 @@ DECLARE_EVENT_CLASS(alarm_processing,
                __assign_str(name, process_name);
        ),
 
+#else
+       TP_fast_assign(
+               __entry->expires = alarm->node.expires.tv64;
+               __entry->second = 0;
+               __entry->minute = 0;
+               __entry->hour = 0;
+               __entry->day = 0;
+               __entry->mon = 0;
+               __entry->year =0;
+               __entry->alarm_type = alarm->type;
+               __assign_str(name, process_name);
+       ),
+#endif
+
        TP_printk("process:%s alarmtimer type:%s expires:%llu "
                  "time: %hu-%u-%u %u:%u:%u",
                  __get_str(name),

Seems to resolve it, but I think a better solution is needed.

thanks
-john

Signature · 2 lines
Baolin.wang
Best Regards