Skip to content

[USDT] perf_events USDT help wanted #61

Closed

Description

@brendangregg

I noticed that nodejs/diagnostics doesn't seem to cover the Linux perf_events USDT work, which originated with Hemant Kumar, has been updated by Masami Hiramatsu, and now getting pushed by Arnaldo Carvalho de Melo. This is Linux mainline support for USDT probes.

Eg, as part of the patchset that was just pulled by Ingo, and will hopefully be then pulled by Linus for the 4.7 release:

  # perf buildid-cache --add /lib/libc-2.17.so
  # perf probe --cache --list | head -n 5
  /usr/lib/libc-2.17.so (a6fb821bdf53660eb2c29f778757aef294d3d392):
  sdt_libc:setjmp=setjmp
  sdt_libc:longjmp=longjmp
  sdt_libc:longjmp_target=longjmp_target
  sdt_libc:memory_heap_new=memory_heap_new
  # perf probe -x /usr/lib/libc-2.17.so \
    -a sdt_libc:memory_heap_new=memory_heap_new
  Added new event:
    sdt_libc:memory_heap_new (on memory_heap_new
   in /usr/lib/libc-2.17.so)
  You can now use it in all perf tools, such as:

          perf record -e sdt_libc:memory_heap_new -aR sleep 1

  # perf probe -l
    sdt_libc:memory_heap_new (on new_heap+183 in /usr/lib/libc-2.17.so)

That example shows the libc USDT probe.

There's more work to do: handling arguments, and more BPF support for in-kernel aggregations. Something that's slowing the process is the lack of help: people testing and commenting on these patchsets. I've done some myself, but help is desired.

nodejs/diagnostics should at least refer to this work, come up with examples for the Node.js probes, and hopefully encourage others to contribute. You can currently search lkml for "SDT" patchsets from either Masami Hiramatsu or Arnaldo Carvalho de Melo, usually marked "perf/core".

This is Linux mainline.

Activity

  1. changed the title [-]perf_events USDT help wanted[/-] [+][USDT] perf_events USDT help wanted[/+] on Sep 22, 2017
  2. gireeshpunathil commented on Oct 25, 2019

    @gireeshpunathil
    Member

    should this remain open? [ I am trying to chase dormant issues to closure ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions