tools: add helper to rewrite a PID

This is mostly useful when troubleshooting PIDs in container namespaces
that don't match the host.
This commit is contained in:
Christian Hergert
2023-02-20 21:04:21 -08:00
parent d0e63f8573
commit 5c06845e86
2 changed files with 142 additions and 5 deletions

View File

@ -18,11 +18,19 @@ sysprof_cat = executable('sysprof-cat', 'sysprof-cat.c',
install: false,
)
sysprof_dump = executable('sysprof-dump', 'sysprof-dump.c',
dependencies: [libsysprof_dep],
c_args: tools_cflags,
install: false,
)
if get_option('libsysprof')
sysprof_dump = executable('sysprof-dump', 'sysprof-dump.c',
dependencies: [libsysprof_dep],
c_args: tools_cflags,
install: false,
)
rewrite_pid = executable('rewrite-pid', ['rewrite-pid.c'],
dependencies: [libsysprof_dep],
c_args: tools_cflags,
install: false,
)
endif
if get_option('sysprofd') == 'bundled' or get_option('libsysprof')
sysprof_profiler_ctl = executable('sysprof-profiler-ctl',