Re: [PATCH bpf-next 2/6] bpf: Store ref_ctr_offsets values in bpf_uprobe array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Oct 27, 2023, at 6:56 AM, Jiri Olsa <olsajiri@xxxxxxxxx> wrote:
> 
> On Thu, Oct 26, 2023 at 09:31:00AM -0700, Song Liu wrote:
>> On Wed, Oct 25, 2023 at 1:24 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>>> 
>>> We will need to return ref_ctr_offsets values through link_info
>>> interface in following change, so we need to keep them around.
>>> 
>>> Storing ref_ctr_offsets values directly into bpf_uprobe array.
>>> 
>>> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
>> 
>> Acked-by: Song Liu <song@xxxxxxxxxx>
>> 
>> with one nitpick below.
>> 
>>> ---
>>> kernel/trace/bpf_trace.c | 14 +++-----------
>>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>> 
>>> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
>>> index df697c74d519..843b3846d3f8 100644
>>> --- a/kernel/trace/bpf_trace.c
>>> +++ b/kernel/trace/bpf_trace.c
>>> @@ -3031,6 +3031,7 @@ struct bpf_uprobe_multi_link;
>>> struct bpf_uprobe {
>>>        struct bpf_uprobe_multi_link *link;
>>>        loff_t offset;
>>> +       unsigned long ref_ctr_offset;
>> 
>> nit: s/unsigned long/loff_t/ ?
> 
> hum, the single uprobe interface also keeps it as 'unsigned long'
> in 'struct trace_uprobe' .. while uprobe code keeps both offset and
> ref_ctr_offset values as loff_t
> 
> is there any benefit by changing that to loff_t?

We have "loff_t offset;" right above this line. So it is better to 
use same type for the two offsets. 

Thanks,
Song





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux