All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect
@ 2024-04-18 13:13 Changbin Du
  2024-04-18 13:13 ` [PATCH 1/4] perf trace beauty: Fix statx flags printing Changbin Du
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Changbin Du @ 2024-04-18 13:13 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel, Changbin Du

Changbin Du (4):
  perf trace beauty: Fix statx flags printing
  perf trace beauty: Beautify newfstatat flags
  perf trace beauty: Always show param if show_zero is set
  perf trace beauty: Always show mprotect prot even though PROT_NONE

 tools/perf/builtin-trace.c      | 15 ++++++++-------
 tools/perf/trace/beauty/statx.c |  3 ++-
 2 files changed, 10 insertions(+), 8 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] perf trace beauty: Fix statx flags printing
  2024-04-18 13:13 [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect Changbin Du
@ 2024-04-18 13:13 ` Changbin Du
  2024-04-18 14:35   ` Arnaldo Carvalho de Melo
  2024-04-18 13:13 ` [PATCH 2/4] perf trace beauty: Beautify newfstatat flags Changbin Du
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Changbin Du @ 2024-04-18 13:13 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel, Changbin Du

Missed a string specifier '%s' in format string.

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

diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
index dc5943a6352d..c61f2be53bda 100644
--- a/tools/perf/trace/beauty/statx.c
+++ b/tools/perf/trace/beauty/statx.c
@@ -21,7 +21,7 @@ size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_
 		return scnprintf(bf, size, "%s%s", show_prefix ? "AT_STATX_" : "", "SYNC_AS_STAT");
 #define	P_FLAG(n) \
 	if (flags & AT_##n) { \
-		printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
+		printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
 		flags &= ~AT_##n; \
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] perf trace beauty: Beautify newfstatat flags
  2024-04-18 13:13 [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect Changbin Du
  2024-04-18 13:13 ` [PATCH 1/4] perf trace beauty: Fix statx flags printing Changbin Du
@ 2024-04-18 13:13 ` Changbin Du
  2024-04-18 13:13 ` [PATCH 3/4] perf trace beauty: Always show param if show_zero is set Changbin Du
  2024-04-18 13:13 ` [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE Changbin Du
  3 siblings, 0 replies; 9+ messages in thread
From: Changbin Du @ 2024-04-18 13:13 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel, Changbin Du

Beautify the flags argument of newfstatat() using the same scnprintf
of statx().

Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
 tools/perf/builtin-trace.c      | 3 ++-
 tools/perf/trace/beauty/statx.c | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 90eaff8c0f6e..19e81a467d6a 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1050,7 +1050,8 @@ static const struct syscall_fmt syscall_fmts[] = {
 	{ .name	    = "name_to_handle_at",
 	  .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
 	{ .name	    = "newfstatat",
-	  .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
+	  .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
+		   [3] = { .scnprintf = SCA_STATX_FLAGS, /* flags */ }, }, },
 	{ .name	    = "open",
 	  .arg = { [1] = { .scnprintf = SCA_OPEN_FLAGS, /* flags */ }, }, },
 	{ .name	    = "open_by_handle_at",
diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
index c61f2be53bda..dd83a2a95d89 100644
--- a/tools/perf/trace/beauty/statx.c
+++ b/tools/perf/trace/beauty/statx.c
@@ -30,6 +30,7 @@ size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_
 	P_FLAG(SYMLINK_FOLLOW);
 	P_FLAG(NO_AUTOMOUNT);
 	P_FLAG(EMPTY_PATH);
+	P_FLAG(STATX_SYNC_AS_STAT);
 	P_FLAG(STATX_FORCE_SYNC);
 	P_FLAG(STATX_DONT_SYNC);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] perf trace beauty: Always show param if show_zero is set
  2024-04-18 13:13 [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect Changbin Du
  2024-04-18 13:13 ` [PATCH 1/4] perf trace beauty: Fix statx flags printing Changbin Du
  2024-04-18 13:13 ` [PATCH 2/4] perf trace beauty: Beautify newfstatat flags Changbin Du
@ 2024-04-18 13:13 ` Changbin Du
  2024-04-18 13:13 ` [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE Changbin Du
  3 siblings, 0 replies; 9+ messages in thread
From: Changbin Du @ 2024-04-18 13:13 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel, Changbin Du

For some parameters, it is best to also display them when they are 0,
e.g. flags.

Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
 tools/perf/builtin-trace.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 19e81a467d6a..349550b02f79 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2086,9 +2086,9 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
 			    !trace->show_zeros &&
 			    !(sc->arg_fmt &&
 			      (sc->arg_fmt[arg.idx].show_zero ||
-			       sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAY ||
-			       sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAYS) &&
-			      sc->arg_fmt[arg.idx].parm))
+			        ((sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAY ||
+			          sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAYS) &&
+			         sc->arg_fmt[arg.idx].parm))))
 				continue;
 
 			printed += scnprintf(bf + printed, size - printed, "%s", printed ? ", " : "");
@@ -2790,8 +2790,8 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel,
 		 */
 		if (val == 0 &&
 		    !trace->show_zeros &&
-		    !((arg->show_zero ||
-		       arg->scnprintf == SCA_STRARRAY ||
+		    !arg->show_zero &&
+		    !((arg->scnprintf == SCA_STRARRAY ||
 		       arg->scnprintf == SCA_STRARRAYS) &&
 		      arg->parm))
 			continue;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE
  2024-04-18 13:13 [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect Changbin Du
                   ` (2 preceding siblings ...)
  2024-04-18 13:13 ` [PATCH 3/4] perf trace beauty: Always show param if show_zero is set Changbin Du
@ 2024-04-18 13:13 ` Changbin Du
  2024-04-18 14:31   ` Arnaldo Carvalho de Melo
  3 siblings, 1 reply; 9+ messages in thread
From: Changbin Du @ 2024-04-18 13:13 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel, Changbin Du

Do not omit the flags even though it is PROT_NONE.

Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE
  2024-04-18 13:13 ` [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE Changbin Du
@ 2024-04-18 14:31   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-04-18 14:31 UTC (permalink / raw)
  To: Changbin Du
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	linux-perf-users, linux-kernel

On Thu, Apr 18, 2024 at 09:13:04PM +0800, Changbin Du wrote:
> Do not omit the flags even though it is PROT_NONE.
> 
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> ---
>  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 */ }, }, },


So since syscall_arg__scnprintf_mmap_prot() special cases 0 to print
NONE for prot... Ok, I'll expand a bit the commit log message _and_ the
syscall_fmts entry for mprotect.

- Arnaldo

>  	{ .name	    = "mq_unlink",
>  	  .arg = { [0] = { .scnprintf = SCA_FILENAME, /* u_name */ }, }, },
>  	{ .name	    = "mremap",	    .hexret = true,
> -- 
> 2.34.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] perf trace beauty: Fix statx flags printing
  2024-04-18 13:13 ` [PATCH 1/4] perf trace beauty: Fix statx flags printing Changbin Du
@ 2024-04-18 14:35   ` Arnaldo Carvalho de Melo
  2024-04-19  1:38     ` duchangbin
  2024-04-19  3:45     ` duchangbin
  0 siblings, 2 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-04-18 14:35 UTC (permalink / raw)
  To: Changbin Du
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	linux-perf-users, linux-kernel

On Thu, Apr 18, 2024 at 09:13:01PM +0800, Changbin Du wrote:
> Missed a string specifier '%s' in format string.

Humm, what branch should this be applied to? I ask because:

⬢[acme@toolbox perf-tools-next]$ git log --oneline tools/perf/trace/beauty/statx.c
f122b3d6d179455e perf beauty: Introduce scrape script for the 'statx' syscall 'mask' argument
3d6cfbaf279ddec9 perf beauty: Introduce scrape script for various fs syscalls 'flags' arguments
a672af9139a843eb tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines
6652830c87be8446 perf beauty: Use the system linux/fcntl.h instead of a copy from the kernel
690811f0128eb603 tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_MNT_ID_UNIQUE
49c75d30b0078d30 tools headers uapi: Sync linux/stat.h with the kernel sources
5d33cbfedb51f732 perf beauty: Add support to STATX_MNT_ID in the 'statx' syscall 'mask' argument
c65c83ffe9045901 perf trace: Allow asking for not suppressing common string prefixes
794f594e0c3be619 perf beauty: Switch from GPL v2.0 to LGPL v2.1
fd5cead23f546973 (tag: perf-core-for-mingo-4.12-20170331) perf trace: Beautify statx syscall 'flag' and 'mask' arguments
⬢[acme@toolbox perf-tools-next]$

⬢[acme@toolbox perf-tools-next]$ tools/perf/trace/beauty/statx_mask.sh 
static const char *statx_mask[] = {
	[ilog2(0x00000001) + 1] = "TYPE",
	[ilog2(0x00000002) + 1] = "MODE",
	[ilog2(0x00000004) + 1] = "NLINK",
	[ilog2(0x00000008) + 1] = "UID",
	[ilog2(0x00000010) + 1] = "GID",
	[ilog2(0x00000020) + 1] = "ATIME",
	[ilog2(0x00000040) + 1] = "MTIME",
	[ilog2(0x00000080) + 1] = "CTIME",
	[ilog2(0x00000100) + 1] = "INO",
	[ilog2(0x00000200) + 1] = "SIZE",
	[ilog2(0x00000400) + 1] = "BLOCKS",
	[ilog2(0x00000800) + 1] = "BTIME",
	[ilog2(0x00001000) + 1] = "MNT_ID",
	[ilog2(0x00002000) + 1] = "DIOALIGN",
	[ilog2(0x00004000) + 1] = "MNT_ID_UNIQUE",
};
⬢[acme@toolbox perf-tools-next]$

Can you please try with what is in
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git,
branch perf-tools-next?

- Arnaldo
 
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> ---
>  tools/perf/trace/beauty/statx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
> index dc5943a6352d..c61f2be53bda 100644
> --- a/tools/perf/trace/beauty/statx.c
> +++ b/tools/perf/trace/beauty/statx.c
> @@ -21,7 +21,7 @@ size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_
>  		return scnprintf(bf, size, "%s%s", show_prefix ? "AT_STATX_" : "", "SYNC_AS_STAT");
>  #define	P_FLAG(n) \
>  	if (flags & AT_##n) { \
> -		printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
> +		printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
>  		flags &= ~AT_##n; \
>  	}
>  
> -- 
> 2.34.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] perf trace beauty: Fix statx flags printing
  2024-04-18 14:35   ` Arnaldo Carvalho de Melo
@ 2024-04-19  1:38     ` duchangbin
  2024-04-19  3:45     ` duchangbin
  1 sibling, 0 replies; 9+ messages in thread
From: duchangbin @ 2024-04-19  1:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: duchangbin, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel

On Thu, Apr 18, 2024 at 11:35:05AM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, Apr 18, 2024 at 09:13:01PM +0800, Changbin Du wrote:
> > Missed a string specifier '%s' in format string.
> 
> Humm, what branch should this be applied to? I ask because:
> 
> ⬢[acme@toolbox perf-tools-next]$ git log --oneline tools/perf/trace/beauty/statx.c
> f122b3d6d179455e perf beauty: Introduce scrape script for the 'statx' syscall 'mask' argument
> 3d6cfbaf279ddec9 perf beauty: Introduce scrape script for various fs syscalls 'flags' arguments
> a672af9139a843eb tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines
> 6652830c87be8446 perf beauty: Use the system linux/fcntl.h instead of a copy from the kernel
> 690811f0128eb603 tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_MNT_ID_UNIQUE
> 49c75d30b0078d30 tools headers uapi: Sync linux/stat.h with the kernel sources
> 5d33cbfedb51f732 perf beauty: Add support to STATX_MNT_ID in the 'statx' syscall 'mask' argument
> c65c83ffe9045901 perf trace: Allow asking for not suppressing common string prefixes
> 794f594e0c3be619 perf beauty: Switch from GPL v2.0 to LGPL v2.1
> fd5cead23f546973 (tag: perf-core-for-mingo-4.12-20170331) perf trace: Beautify statx syscall 'flag' and 'mask' arguments
> ⬢[acme@toolbox perf-tools-next]$
> 
> ⬢[acme@toolbox perf-tools-next]$ tools/perf/trace/beauty/statx_mask.sh 
> static const char *statx_mask[] = {
> 	[ilog2(0x00000001) + 1] = "TYPE",
> 	[ilog2(0x00000002) + 1] = "MODE",
> 	[ilog2(0x00000004) + 1] = "NLINK",
> 	[ilog2(0x00000008) + 1] = "UID",
> 	[ilog2(0x00000010) + 1] = "GID",
> 	[ilog2(0x00000020) + 1] = "ATIME",
> 	[ilog2(0x00000040) + 1] = "MTIME",
> 	[ilog2(0x00000080) + 1] = "CTIME",
> 	[ilog2(0x00000100) + 1] = "INO",
> 	[ilog2(0x00000200) + 1] = "SIZE",
> 	[ilog2(0x00000400) + 1] = "BLOCKS",
> 	[ilog2(0x00000800) + 1] = "BTIME",
> 	[ilog2(0x00001000) + 1] = "MNT_ID",
> 	[ilog2(0x00002000) + 1] = "DIOALIGN",
> 	[ilog2(0x00004000) + 1] = "MNT_ID_UNIQUE",
> };
> ⬢[acme@toolbox perf-tools-next]$
> 
> Can you please try with what is in
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git,
> branch perf-tools-next?
> 
No problem, let me rebase on perf-tools-next. This patchset was created on
mainline.

> - Arnaldo
>  
> > Signed-off-by: Changbin Du <changbin.du@huawei.com>
> > ---
> >  tools/perf/trace/beauty/statx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
> > index dc5943a6352d..c61f2be53bda 100644
> > --- a/tools/perf/trace/beauty/statx.c
> > +++ b/tools/perf/trace/beauty/statx.c
> > @@ -21,7 +21,7 @@ size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_
> >  		return scnprintf(bf, size, "%s%s", show_prefix ? "AT_STATX_" : "", "SYNC_AS_STAT");
> >  #define	P_FLAG(n) \
> >  	if (flags & AT_##n) { \
> > -		printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
> > +		printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
> >  		flags &= ~AT_##n; \
> >  	}
> >  
> > -- 
> > 2.34.1
> 

-- 
Cheers,
Changbin Du

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] perf trace beauty: Fix statx flags printing
  2024-04-18 14:35   ` Arnaldo Carvalho de Melo
  2024-04-19  1:38     ` duchangbin
@ 2024-04-19  3:45     ` duchangbin
  1 sibling, 0 replies; 9+ messages in thread
From: duchangbin @ 2024-04-19  3:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: duchangbin, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, linux-perf-users, linux-kernel

Hi, Arnaldo,

On Thu, Apr 18, 2024 at 11:35:05AM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, Apr 18, 2024 at 09:13:01PM +0800, Changbin Du wrote:
> > Missed a string specifier '%s' in format string.
> 
> Humm, what branch should this be applied to? I ask because:
> 
> ⬢[acme@toolbox perf-tools-next]$ git log --oneline tools/perf/trace/beauty/statx.c
> f122b3d6d179455e perf beauty: Introduce scrape script for the 'statx' syscall 'mask' argument
> 3d6cfbaf279ddec9 perf beauty: Introduce scrape script for various fs syscalls 'flags' arguments
> a672af9139a843eb tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines
> 6652830c87be8446 perf beauty: Use the system linux/fcntl.h instead of a copy from the kernel
> 690811f0128eb603 tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_MNT_ID_UNIQUE
> 49c75d30b0078d30 tools headers uapi: Sync linux/stat.h with the kernel sources
> 5d33cbfedb51f732 perf beauty: Add support to STATX_MNT_ID in the 'statx' syscall 'mask' argument
> c65c83ffe9045901 perf trace: Allow asking for not suppressing common string prefixes
> 794f594e0c3be619 perf beauty: Switch from GPL v2.0 to LGPL v2.1
> fd5cead23f546973 (tag: perf-core-for-mingo-4.12-20170331) perf trace: Beautify statx syscall 'flag' and 'mask' arguments
> ⬢[acme@toolbox perf-tools-next]$
> 
> ⬢[acme@toolbox perf-tools-next]$ tools/perf/trace/beauty/statx_mask.sh 
> static const char *statx_mask[] = {
> 	[ilog2(0x00000001) + 1] = "TYPE",
> 	[ilog2(0x00000002) + 1] = "MODE",
> 	[ilog2(0x00000004) + 1] = "NLINK",
> 	[ilog2(0x00000008) + 1] = "UID",
> 	[ilog2(0x00000010) + 1] = "GID",
> 	[ilog2(0x00000020) + 1] = "ATIME",
> 	[ilog2(0x00000040) + 1] = "MTIME",
> 	[ilog2(0x00000080) + 1] = "CTIME",
> 	[ilog2(0x00000100) + 1] = "INO",
> 	[ilog2(0x00000200) + 1] = "SIZE",
> 	[ilog2(0x00000400) + 1] = "BLOCKS",
> 	[ilog2(0x00000800) + 1] = "BTIME",
> 	[ilog2(0x00001000) + 1] = "MNT_ID",
> 	[ilog2(0x00002000) + 1] = "DIOALIGN",
> 	[ilog2(0x00004000) + 1] = "MNT_ID_UNIQUE",
> };
> ⬢[acme@toolbox perf-tools-next]$
> 
> Can you please try with what is in
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git,
> branch perf-tools-next?
> 
> - Arnaldo
>
This code has been refactored and the old bug is gone. Could you just pick up
the last two changes?

  perf trace beauty: Always show param if show_zero is set
  perf trace beauty: Always show mprotect prot even though PROT_NONE

-- 
Cheers,
Changbin Du

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-19  3:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 13:13 [PATCH 0/4] perf trace beauty: A fix and some improvements for newfstatat,mprotect Changbin Du
2024-04-18 13:13 ` [PATCH 1/4] perf trace beauty: Fix statx flags printing Changbin Du
2024-04-18 14:35   ` Arnaldo Carvalho de Melo
2024-04-19  1:38     ` duchangbin
2024-04-19  3:45     ` duchangbin
2024-04-18 13:13 ` [PATCH 2/4] perf trace beauty: Beautify newfstatat flags Changbin Du
2024-04-18 13:13 ` [PATCH 3/4] perf trace beauty: Always show param if show_zero is set Changbin Du
2024-04-18 13:13 ` [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE Changbin Du
2024-04-18 14:31   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.