[ltt-dev] [PATCH 2/3] ltt: rework trace clock code for SH

Giuseppe CAVALLARO peppe.cavallaro at st.com
Wed Apr 7 02:49:23 EDT 2010


Hi Mathieu,
there is a problem in this patch concerning the rating as well.
Doesn't it make sense to use clock->rating.
So I've to review it.

Giuseppe

Giuseppe CAVALLARO wrote:
> Hi Mathieu,
> Mathieu Desnoyers wrote:
>>>  static inline u32 trace_clock_read32(void)
>>>  {
>>> -	return get_cycles();
>>> +	if (likely(clock))
>>> +		return (u32) clock->read(clock);
>> Can you walk us through the code that is executed when clock->read() is
>> called ?  Is it possible that the clock source read() takes a xtime seq
>> read lock in some SH configurations ?
> 
> On SH, the trace_clock_read_synthetic_tsc invokes the
> sh_tmu_clocksource_read (clock->read), in drivers/clocksource/sh_tmu.c.
> This reads the timer counter register (TCNT).
> 
> What do you think?
> 
> Regards
> Giuseppe
> 
>> If it is the case, then we will run into deadlocks with tracing code
>> called from within the xtime seq write lock. Therefore, fixing this
>> without calling the clocksource read() would be adequate.
>>
>> Thanks,
>>
>> Mathieu
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 





More information about the lttng-dev mailing list