Thread (50 messages) 50 messages, 6 authors, 2020-03-01

Re: [PATCH 04/18] bpf: Add name to struct bpf_ksym

From: Jiri Olsa <hidden>
Date: 2020-02-27 08:50:19
Also in: bpf

On Wed, Feb 26, 2020 at 01:14:43PM -0800, Song Liu wrote:
On Wed, Feb 26, 2020 at 5:04 AM Jiri Olsa [off-list ref] wrote:
quoted
Adding name to 'struct bpf_ksym' object to carry the name
of the symbol for bpf_prog, bpf_trampoline, bpf_dispatcher.

The current benefit is that name is now generated only when
the symbol is added to the list, so we don't need to generate
it every time it's accessed.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
The patch looks good. But I wonder whether we want pay the cost of
extra 128 bytes per bpf program. Maybe make it a pointer and only
generate the string when it is first used?
I thought 128 would not be that bad, also the code is quite
simple because of that.. if that's really a concern I could
make the changes, but that would probably mean changing the
design

jirka
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help