On Tue, 12 May 2026 08:47:50 +0900 Masami Hiramatsu (Google) <[email protected]> wrote:
> On Fri, 8 May 2026 20:26:23 +0800 > Chen Jun <[email protected]> wrote: > > > Low-level functions have many call paths, and sometimes > > we only care about the calls on a specific call path. > > Add a new filter to filter based on the call stack. > > > > Usage: > > 1. echo 'caller=="$function_name"' > events/../filter > > Thanks for interesting idea :) > > BTW, we already have "stacktrace". Since this actually checks > stacktrace, not caller, so I think we should reuse it. > Also, I think OP_GLOB is more suitable for this case. > (and more useful) Actually, it's not a stack trace, it's a function that is called from other functions. But since "caller" sounds like a direct called function (stack trace of the first instance), I think perhaps it should be "called_within" or something similar. :-/ Also, OP_GLOB can't work because it only works for a single function. At the time of parsing, it finds the function (and should probably error out if there's more than one function with a given name). It then records the start and end address of the function so it only needs to find if one of the entries in the stack trace is between the start and end of the function. I don't think this is possible with GLOB. We don't want to do a search of the functions when the event is triggered. -- Steve
