public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf kmem: Change a word from migratetype to migrate_type for unity
@ 2017-11-16 13:41 Sihyeon Jang
  2017-11-16 14:14 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Sihyeon Jang @ 2017-11-16 13:41 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Sihyeon Jang

Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
---
 tools/perf/builtin-kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 557d391..43858cd 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -786,7 +786,7 @@ static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
 	unsigned int order = perf_evsel__intval(evsel, sample, "order");
 	unsigned int gfp_flags = perf_evsel__intval(evsel, sample, "gfp_flags");
 	unsigned int migrate_type = perf_evsel__intval(evsel, sample,
-						       "migratetype");
+						       "migrate_type");
 	u64 bytes = kmem_page_size << order;
 	u64 callsite;
 	struct page_stat *pstat;
-- 
2.7.4

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

* Re: [PATCH] perf kmem: Change a word from migratetype to migrate_type for unity
  2017-11-16 13:41 [PATCH] perf kmem: Change a word from migratetype to migrate_type for unity Sihyeon Jang
@ 2017-11-16 14:14 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-16 14:14 UTC (permalink / raw)
  To: Sihyeon Jang; +Cc: linux-kernel, Jiri Olsa, Namhyung Kim

Em Thu, Nov 16, 2017 at 10:41:46PM +0900, Sihyeon Jang escreveu:
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>

Please describe the problem and why such word change is warranted.

Its not enough to say what is being done, you need to say _why_.

And this seems bogus, look:

                { "kmem:mm_page_alloc",         perf_evsel__process_page_alloc_event, },

So that function handles:

[root@jouet ~]# grep field.*migrate /sys/kernel/debug/tracing/events/kmem/mm_page_alloc/format 
	field:int migratetype;	offset:24;	size:4;	signed:1;
[root@jouet ~]# 

The field is not named "migrate_type", so your change will _break_ the
'perf kmem' tool, not good :-)

- Arnaldo

> ---
>  tools/perf/builtin-kmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
> index 557d391..43858cd 100644
> --- a/tools/perf/builtin-kmem.c
> +++ b/tools/perf/builtin-kmem.c
> @@ -786,7 +786,7 @@ static int perf_evsel__process_page_alloc_event(struct perf_evsel *evsel,
>  	unsigned int order = perf_evsel__intval(evsel, sample, "order");
>  	unsigned int gfp_flags = perf_evsel__intval(evsel, sample, "gfp_flags");
>  	unsigned int migrate_type = perf_evsel__intval(evsel, sample,
> -						       "migratetype");
> +						       "migrate_type");
>  	u64 bytes = kmem_page_size << order;
>  	u64 callsite;
>  	struct page_stat *pstat;
> -- 
> 2.7.4

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

end of thread, other threads:[~2017-11-16 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-16 13:41 [PATCH] perf kmem: Change a word from migratetype to migrate_type for unity Sihyeon Jang
2017-11-16 14:14 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox