Re: [PATCH 04/14] perf/bench: Rename 'mem-memcpy.c' => 'mem-functions.c'

From: Arnaldo Carvalho de Melo
Date: Mon Oct 19 2015 - 14:37:28 EST


Em Mon, Oct 19, 2015 at 04:35:20PM -0200, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Oct 19, 2015 at 10:04:20AM +0200, Ingo Molnar escreveu:
> > So mem-memcpy.c started out as a simple memcpy() benchmark, then
> > it grew memset() functionality and now I plan to add string copy
> > benchmarks as well.
> >
> > This makes the file name a misnomer: rename it to the more generic
> > mem-functions.c name.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> > Cc: David Ahern <dsahern@xxxxxxxxx>
> > Cc: Hitoshi Mitake <mitake@xxxxxxxxxxxxxxxxxxxxx>
> > Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> > Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> > Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: linux-kernel@xxxxxxxxxxxxxxx
> > Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> > ---
> > tools/perf/bench/Build | 2 +-
> > tools/perf/bench/mem-functions.c | 420 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Oops, this is not renaming anything, right? And it also introducs
> __unused usage, which breaks the build.
>
> Lemme try to do it...

Just after applying this patch, I tried a diff and figure this, fixing
it by just renaming it.

$ diff -u tools/perf/bench/mem-memcpy.c tools/perf/bench/mem-functions.c
--- tools/perf/bench/mem-memcpy.c 2015-10-19 15:29:08.761643798 -0300
+++ tools/perf/bench/mem-functions.c 2015-10-19 15:35:34.986776289 -0300
@@ -1,7 +1,7 @@
/*
- * mem-memcpy.c
+ * mem-functions.c
*
- * Simple memcpy() and memset() benchmarks
+ * Simple memcpy() and memset() benchmarks.
*
* Written by Hitoshi Mitake <mitake@xxxxxxxxxxxxxxxxxxxxx>
*/
@@ -324,7 +324,7 @@
return (double)(((double)len * iterations) / timeval2double(&tv_diff));
}

-int bench_mem_memcpy(int argc, const char **argv, const char *prefix __maybe_unused)
+int bench_mem_memcpy(int argc, const char **argv, const char *prefix __unused)
{
struct bench_mem_info info = {
.routines = memcpy_routines,
@@ -407,7 +407,7 @@
{ NULL, }
};

-int bench_mem_memset(int argc, const char **argv, const char *prefix __maybe_unused)
+int bench_mem_memset(int argc, const char **argv, const char *prefix __unused)
{
struct bench_mem_info info = {
.routines = memset_routines,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/