[PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE

From: Changbin Du
Date: Thu Apr 18 2024 - 09:29:29 EST


Do not omit the flags even though it is PROT_NONE.

Signed-off-by: Changbin Du <changbin.du@xxxxxxxxxx>
---
tools/perf/builtin-trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 349550b02f79..7f936f1b5519 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1042,7 +1042,7 @@ static const struct syscall_fmt syscall_fmts[] = {
[4] = { .scnprintf = SCA_MOVE_MOUNT_FLAGS, /* flags */ }, }, },
{ .name = "mprotect",
.arg = { [0] = { .scnprintf = SCA_HEX, /* start */ },
- [2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ }, }, },
+ [2] = { .scnprintf = SCA_MMAP_PROT, .show_zero = true, /* prot */ }, }, },
{ .name = "mq_unlink",
.arg = { [0] = { .scnprintf = SCA_FILENAME, /* u_name */ }, }, },
{ .name = "mremap", .hexret = true,
--
2.34.1