[ktap] Re: [PATCH] add new symbol module to search symbols in DSO (for uprobes)

  • From: Jovi Zhangwei <jovi.zhangwei@xxxxxxxxx>
  • To: ktap@xxxxxxxxxxxxx
  • Date: Thu, 7 Nov 2013 11:29:36 +0800

On Wed, Nov 6, 2013 at 5:51 PM, Azat Khuzhin <a3at.mail@xxxxxxxxx> wrote:
> This will allow to don't hardcoding addresses of functions in ktap
> scripts, that use uprobes, but instead, use normal function names.
>
> Before this patch:
> $ ktap -e 'trace probe:/path/to/bin:0xDEADBEAF' # instead some real address
>
> After this path:
> $ ktap -e 'trace probe:/path/to/bin:foo'
>
> Works also for ret probes (%return)
> Requires libelf.
>
> Have NO_LIBELF option for makefile, for cross-builds.
>
> Signed-off-by: Azat Khuzhin <a3at.mail@xxxxxxxxx>
> ---
> v2: make it more pretty
> v3: make it faster (thanks to Yicheng)
> v4: add NO_LIBELF option into Makefile, and more common parsing
> v5: fix leaking of "tail"
> v6: coding styles fixes
>
Applied, thank you.

Now we can use symbol(like malloc and free) in ktap uprobe scripts, a big step.

Jovi

Other related posts: