On Wed, 21 Sep 2016, Baolin Wang wrote:
> On 21 September 2016 at 06:27, Thomas Gleixner <t...@linutronix.de> wrote:
> >> +     TP_fast_assign(
> >> +             __entry->second = rtc_time->tm_sec;
> >> +             __entry->minute = rtc_time->tm_min;
> >> +             __entry->hour = rtc_time->tm_hour;
> >> +             __entry->day = rtc_time->tm_mday;
> >> +             __entry->mon = rtc_time->tm_mon;
> >> +             __entry->year = rtc_time->tm_year;
> >> +             __entry->alarm_type = flag;
> >
> > What's the value of storing the alarm time in RTC format?
> 
> As suggested by Steven, change the type of RTC value to save trace buffer.

A single u64 does not take more storage space than this and it's a single
store.
 
> > 2) You store the expiry time again in RTC format. Store the information in
> >    a plain u64 and be done with it.
> 
> But I still think the RTC format is more readable for debugging alarm timer.

That's what post processing is for.
 
> > What's the point of this conditional? Avoiding rtc_ktime_to_tm() ? Oh 
> > well...
> >
> >> +             tm_set = rtc_ktime_to_tm(now);
> >> +             trace_alarmtimer_suspend(&tm_set, type);
> >
> > "now" is CLOCK_REALTIME based. You store the type of the alarm timer which
> > is the first to expire and therefor is the one setting the RTC value, but
> > we don't know which timer it is. Useful - NOT!
> 
> We can know the timer by comparing the expire time.

Please make it similar to the timer/hrtimer tracing so people can reuse
their postprocessing scripts with minimial tweaks.

Thanks,

        tglx

Reply via email to