perf trace beauty open flags: Support O_TMPFILE and O_NOFOLLOW
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 14 Jul 2017 14:57:28 +0000 (11:57 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Jul 2017 02:13:58 +0000 (23:13 -0300)
The open syscall flags beautifier wasn't considering those flags, fix
it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ukzoldh4arrl8x2uwjafd22h@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/trace/beauty/open_flags.c

index b3c7f1155d80744bf299e70808d039d322b3e2ec..5fb57bed7ea2cf9256f073d0674e785fe4c51c41 100644 (file)
 #define O_NOATIME      01000000
 #endif
 
+#ifndef O_TMPFILE
+#define O_TMPFILE      020000000
+#endif
+
 size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
 {
        int printed = 0;
@@ -34,6 +38,8 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
        P_FLAG(DIRECTORY);
        P_FLAG(EXCL);
        P_FLAG(LARGEFILE);
+       P_FLAG(NOFOLLOW);
+       P_FLAG(TMPFILE);
        P_FLAG(NOATIME);
        P_FLAG(NOCTTY);
 #ifdef O_NONBLOCK