Re: [PATCH RESEND] trace_uprobe: support reference counter in fd-based uprobe

From: Song Liu
Date: Fri Sep 28 2018 - 10:50:59 EST




> On Sep 28, 2018, at 12:52 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Fri, Sep 28, 2018 at 07:23:20AM +0000, Song Liu wrote:
>> Hi Peter,
>>> #ifdef CONFIG_UPROBE_EVENTS
>>> +PMU_FORMAT_ATTR(ref_ctr_offset, "config:63-24");
>>
>> I guess you meant this part? This is for uprobe only, so I put
>> it here.
>
> Ah,.. right you are.
>
> You seem to have the bitfield backwards, does that mean we should write
> the bits in backwards too? Seems a tad loopy if you ask me.
>
> Did you instead mean: "config:24-63" ? Also, why 40 bits? 32 seems like
> a much more natural amount.

I guess it should be "config:24-63". I didn't realize the bit order here.
I picked 40 bits files up to 1 TB. 32 bits should be also be enough for
most cases. Let me fix these in v2.

Thanks,
Song