Behdad Esfahbod wrote:
>   - If I compile with anything other than -O0, I get all zeros printed.
> Any optimization level makes gcc drop the inline assembly away.
> Incidentally, no optimization is hardly the best thing to profile.
>   
Adding "volatile" will keep assembly:

asm volatile (".byte 0x0f, 0x31" : "=A" (start));

-- 
Aivars

_______________________________________________
Performance-list mailing list
Performance-list@gnome.org
http://mail.gnome.org/mailman/listinfo/performance-list

Reply via email to