[ltt-dev] [PATCH] fix the "unknown" case

Paolo Bonzini pbonzini at redhat.com
Tue Jun 15 04:52:23 EDT 2010


On 06/14/2010 08:25 PM, Paul E. McKenney wrote:
>> Anyway, a simple configure test is to compile this with -fdump-rtl-expand:
>>
>> 	int
>> 	f()
>> 	{
>> 	  __sync_synchronize();
>> 	}
>>
>> If the assembly output includes "__sync_synchronize", or the dump
>> file includes the text "unspec:BLK", it should be fine.  In
>> particular, ia64, mips, and Alpha are ok.  Else you can use the
>> pthreads trick.  I can try to make a patch if you're interested.
>> Or, more simply, it's possible to hardcode the above three platforms
>> since it's unlikely that others will be added soon.
>
> And I attached the input file, the .expand file, and the .s file.
>
> I see neither __sync_synchronize in the .s file nor "unspec" in the
> .expand file.  Or was I confused about what to look for?

No, the __sync_synchronize instruction is optimized out.  I think I'll 
make GCC 4.6+ give a warning.

Paolo




More information about the lttng-dev mailing list