perf trace beauty open flags: Move RDRW to the start of the output

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 <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-d4d9nd88t4bu9y9odbrcb5z6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 89e8524a
...@@ -33,6 +33,7 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size) ...@@ -33,6 +33,7 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
flags &= ~O_##n; \ flags &= ~O_##n; \
} }
P_FLAG(RDWR);
P_FLAG(APPEND); P_FLAG(APPEND);
P_FLAG(ASYNC); P_FLAG(ASYNC);
P_FLAG(CLOEXEC); P_FLAG(CLOEXEC);
...@@ -53,7 +54,6 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size) ...@@ -53,7 +54,6 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
#ifdef O_PATH #ifdef O_PATH
P_FLAG(PATH); P_FLAG(PATH);
#endif #endif
P_FLAG(RDWR);
#ifdef O_DSYNC #ifdef O_DSYNC
if ((flags & O_SYNC) == O_SYNC) if ((flags & O_SYNC) == O_SYNC)
printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", "SYNC"); printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", "SYNC");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment