Skip to contentSkip to conversation

perf trace beauty clone: Handle CLONE_PIDFD

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 30, 2019 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  ee364dcdcd008530883efc0e690fc8e85622f9b5
Gitweb:     https://git.kernel.org/tip/ee364dcdcd008530883efc0e690fc8e85622f9b5
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 21 May 2019 16:51:08 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 28 May 2019 18:37:43 -0300

perf trace beauty clone: Handle CLONE_PIDFD

In addition to the older flags. This will allow something like this to be implemented in 'perf trace"

perf trace -e clone/PIDFD in flags/

I.e. ask for strace like tracing, system wide, looking for 'clone' syscalls that have the CLONE_PIDFD bit set in the 'flags' arg.

For now we'll just see PIDFD if it is set in the 'flags' arg.

Cc Christian Brauner <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Brendan Gregg <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Luis Cláudio Gonçalves <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/perf/trace/beauty/clone.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/trace/beauty/clone.c +1 -0
index 6eb9a6636171..1a8d3be2030e 100644
@@ -25,6 +25,7 @@ static size_t clone__scnprintf_flags(unsigned long flags, char *bf, size_t size,
 	P_FLAG(FS);
 	P_FLAG(FILES);
 	P_FLAG(SIGHAND);
+	P_FLAG(PIDFD);
 	P_FLAG(PTRACE);
 	P_FLAG(VFORK);
 	P_FLAG(PARENT);