-
Notifications
You must be signed in to change notification settings - Fork 5
Description
that we are going to want to print anything when it is full. Maybe for debugging? obj_instance[6]
https://lore.kernel.org/all/20221017155829.7e8d4812@gandalf.local.home/
I'm thinking instead of using the above syntax that is new, instead use
the syntax that is used by kprobes, eprobes and uprobes. That is:
objtrace:+offset(obj):type
That is, instead of:
objtrace:add:arg1,0x28:u32:1
have:
objtrace:+0x28(arg1):u32
Perhaps we can add for count for greater than 1:
obtrace:+0x28(arg1):u32[2]
for two items.
Then we could do even more complex analysis where we can dereference a
pointer within a structure to another pointer:
obtrace:+0x16(+0x28(arg1)):u32[2]
Which will look at arg1, add 0x28 to it. dereference that location,
then add 0x16 to the value, and then dereference that location as well.
This code is available in the kprobe code that eprobes also uses:
See process_fetch_insn() in kernel/trace/trace_eprobe.c
and the parsing of the string is in kernel/trace/trace_probe.c:
parse_probe_arg()
I think doing this will make it much more extensive, not to mention it
will match the syntax of other code in the tracing infrastructure.
What do you think?
-- Steve
https://lore.kernel.org/all/20220924160136.5029e942@rorschach.local.home/