From: Arnaldo Carvalho de Melo <[email protected]>

We were getting:

 62597.859 ( 0.005 ms): TaskSchedulerF/18107 fcntl(fd: 194, cmd: GETFL) = 
LARGEFILE|RDWR

Instead of the more familiar (from looking at strace output):

 62597.859 ( 0.005 ms): TaskSchedulerF/18107 fcntl(fd: 194, cmd: GETFL) = 
RDWR|LARGEFILE

Fix it.

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/trace/beauty/open_flags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/trace/beauty/open_flags.c 
b/tools/perf/trace/beauty/open_flags.c
index e520112fdb6e..3c20683d8cfb 100644
--- a/tools/perf/trace/beauty/open_flags.c
+++ b/tools/perf/trace/beauty/open_flags.c
@@ -33,6 +33,7 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, 
size_t size)
                flags &= ~O_##n; \
        }
 
+       P_FLAG(RDWR);
        P_FLAG(APPEND);
        P_FLAG(ASYNC);
        P_FLAG(CLOEXEC);
@@ -53,7 +54,6 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, 
size_t size)
 #ifdef O_PATH
        P_FLAG(PATH);
 #endif
-       P_FLAG(RDWR);
 #ifdef O_DSYNC
        if ((flags & O_SYNC) == O_SYNC)
                printed += scnprintf(bf + printed, size - printed, "%s%s", 
printed ? "|" : "", "SYNC");
-- 
2.9.4

Reply via email to