This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Systemtap's DTRACE_PROBE and clang
- From: Martin Martin <martin at infinio dot com>
- To: Josh Stone <jistone at redhat dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org
- Date: Fri, 20 Sep 2013 17:40:08 -0400
- Subject: Re: Systemtap's DTRACE_PROBE and clang
- Authentication-results: sourceware.org; auth=none
- References: <CAAQ0mPj9t_TtzsnoaNPO5U8sTtfg2NQYjEzkZUwP3P7q5_dE7Q at mail dot gmail dot com> <y0mtxhfjp48 dot fsf at fche dot csb> <523CA9CB dot 7020807 at redhat dot com> <CAAQ0mPja9Sj_+NyNkzydo5u8kMdBR2raZ87790RbqRUcTzgiYw at mail dot gmail dot com> <523CBDD8 dot 8060006 at redhat dot com>
Yes, single % works, but %% doesn't in Clang.
On Fri, Sep 20, 2013 at 5:27 PM, Josh Stone <jistone@redhat.com> wrote:
> On 09/20/2013 01:26 PM, Martin Martin wrote:
>> You also need % for the other section in sys/sdt.h, progbits, and then it works!
>
> In my brief attempt, it appears that GCC *doesn't* want that escaped to
> %%progbits - I guess because there are no operands to expand in that
> particular asm statement? Is that true for clang too?
>
>>
>> On Fri, Sep 20, 2013 at 4:02 PM, Josh Stone <jistone@redhat.com> wrote:
>>> On 09/20/2013 11:59 AM, Frank Ch. Eigler wrote:
>>>>
>>>> martin wrote:
>>>>
>>>>> [...]
>>>>> How onerous is it to change the code here? [...]
>>>>> Workaround for now, it does work if you change it to:
>>>>> .pushsection .note.stapsdt,"?",@note
>>>>
>>>> I don't recall any deep discusson on that topic. It could be
>>>> just to immunize it from being misinterpreted as a comment
>>>> (see the @-comment-on-arm line on the same AS doc page).
>>>
>>> Based on that, I'm experimenting with %note instead. It's a little more
>>> complicated since that has to be escaped to %%note for C probes, but not
>>> escaped for probes in pure ASM source files. But that's just an #ifdef
>>> __ASSEMBLER__, and so far this seems to work.
>>>
>>> I'd appreciate if you can confirm it with your "?"-patched clang.
>>>
>>> Thanks,
>>> Josh
>