Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Steven Rostedt
On Wed, 21 Sep 2016 14:36:23 +0200 (CEST) Thomas Gleixner wrote: > On Wed, 21 Sep 2016, Steven Rostedt wrote: > > On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) > > Thomas Gleixner wrote: > > > A single u64 does not take more storage space than this and it's

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Steven Rostedt
On Wed, 21 Sep 2016 14:36:23 +0200 (CEST) Thomas Gleixner wrote: > On Wed, 21 Sep 2016, Steven Rostedt wrote: > > On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) > > Thomas Gleixner wrote: > > > A single u64 does not take more storage space than this and it's a single > > > store. > > > > So to

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Thomas Gleixner
On Wed, 21 Sep 2016, Steven Rostedt wrote: > On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) > Thomas Gleixner wrote: > > A single u64 does not take more storage space than this and it's a single > > store. > > So to use rtc_tm_to_time64()? Is the work to do the calculations of the

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Thomas Gleixner
On Wed, 21 Sep 2016, Steven Rostedt wrote: > On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) > Thomas Gleixner wrote: > > A single u64 does not take more storage space than this and it's a single > > store. > > So to use rtc_tm_to_time64()? Is the work to do the calculations of the > conversion faster

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Steven Rostedt
On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) Thomas Gleixner wrote: > > As suggested by Steven, change the type of RTC value to save trace buffer. The original code did everything just like the above but stored every value into ints, I just said that the value could be stored

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Steven Rostedt
On Wed, 21 Sep 2016 09:26:20 +0200 (CEST) Thomas Gleixner wrote: > > As suggested by Steven, change the type of RTC value to save trace buffer. The original code did everything just like the above but stored every value into ints, I just said that the value could be stored in chars to save

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Baolin Wang
On 21 September 2016 at 15:26, Thomas Gleixner wrote: > On Wed, 21 Sep 2016, Baolin Wang wrote: >> On 21 September 2016 at 06:27, Thomas Gleixner wrote: >> >> + TP_fast_assign( >> >> + __entry->second = rtc_time->tm_sec; >> >> +

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Baolin Wang
On 21 September 2016 at 15:26, Thomas Gleixner wrote: > On Wed, 21 Sep 2016, Baolin Wang wrote: >> On 21 September 2016 at 06:27, Thomas Gleixner wrote: >> >> + TP_fast_assign( >> >> + __entry->second = rtc_time->tm_sec; >> >> + __entry->minute = rtc_time->tm_min; >>

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Thomas Gleixner
On Wed, 21 Sep 2016, Baolin Wang wrote: > On 21 September 2016 at 06:27, Thomas Gleixner wrote: > >> + TP_fast_assign( > >> + __entry->second = rtc_time->tm_sec; > >> + __entry->minute = rtc_time->tm_min; > >> + __entry->hour =

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Thomas Gleixner
On Wed, 21 Sep 2016, Baolin Wang wrote: > On 21 September 2016 at 06:27, Thomas Gleixner wrote: > >> + TP_fast_assign( > >> + __entry->second = rtc_time->tm_sec; > >> + __entry->minute = rtc_time->tm_min; > >> + __entry->hour = rtc_time->tm_hour; > >> +

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-20 Thread Baolin Wang
On 21 September 2016 at 06:27, Thomas Gleixner wrote: > On Sun, 18 Sep 2016, Baolin Wang wrote: >> +DECLARE_EVENT_CLASS(alarm_setting, > > What is alarm_setting? Without looking at the DEFINE_EVENT which uses this > I cannot decode the meaning. Will rename it. > >> +

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-20 Thread Baolin Wang
On 21 September 2016 at 06:27, Thomas Gleixner wrote: > On Sun, 18 Sep 2016, Baolin Wang wrote: >> +DECLARE_EVENT_CLASS(alarm_setting, > > What is alarm_setting? Without looking at the DEFINE_EVENT which uses this > I cannot decode the meaning. Will rename it. > >> + TP_STRUCT__entry( >> +

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-20 Thread Thomas Gleixner
On Sun, 18 Sep 2016, Baolin Wang wrote: > +DECLARE_EVENT_CLASS(alarm_setting, What is alarm_setting? Without looking at the DEFINE_EVENT which uses this I cannot decode the meaning. > + TP_STRUCT__entry( > + __field(unsigned char, second) > + __field(unsigned char,

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-20 Thread Thomas Gleixner
On Sun, 18 Sep 2016, Baolin Wang wrote: > +DECLARE_EVENT_CLASS(alarm_setting, What is alarm_setting? Without looking at the DEFINE_EVENT which uses this I cannot decode the meaning. > + TP_STRUCT__entry( > + __field(unsigned char, second) > + __field(unsigned char,

[PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-18 Thread Baolin Wang
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

[PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-18 Thread Baolin Wang
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