From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 09/13] perf tools: Use default CPUINFO_PROC where it fits
Date: Mon, 21 Aug 2017 16:25:45 -0300 [thread overview]
Message-ID: <20170821192549.17251-10-acme@kernel.org> (raw)
In-Reply-To: <20170821192549.17251-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Several architectures don't need to define it since the string is the
same as the default one, so nuke them.
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-v1e1jr1u474w9xcelpaoxamu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/perf-sys.h | 19 ++-----------------
| 3 ---
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h
index 2aaa7366cdc2..c11f0c76e90c 100644
--- a/tools/perf/perf-sys.h
+++ b/tools/perf/perf-sys.h
@@ -9,14 +9,6 @@
#include <linux/perf_event.h>
#include <asm/barrier.h>
-#if defined(__i386__)
-#define CPUINFO_PROC {"model name"}
-#endif
-
-#if defined(__x86_64__)
-#define CPUINFO_PROC {"model name"}
-#endif
-
#ifdef __powerpc__
#define CPUINFO_PROC {"cpu"}
#endif
@@ -41,17 +33,10 @@
#define CPUINFO_PROC {"cpu model"}
#endif
-#ifdef __ia64__
-#define CPUINFO_PROC {"model name"}
-#endif
-
#ifdef __arm__
#define CPUINFO_PROC {"model name", "Processor"}
#endif
-#ifdef __aarch64__
-#endif
-
#ifdef __mips__
#define CPUINFO_PROC {"cpu model"}
#endif
@@ -68,8 +53,8 @@
#define CPUINFO_PROC {"core ID"}
#endif
-#ifdef __tile__
-#define CPUINFO_PROC {"model name"}
+#ifndef CPUINFO_PROC
+#define CPUINFO_PROC { "model name", }
#endif
static inline int
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 28bf4442d577..605bbd5404fb 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -380,9 +380,6 @@ static int __write_cpudesc(struct feat_fd *ff, const char *cpuinfo_proc)
static int write_cpudesc(struct feat_fd *ff,
struct perf_evlist *evlist __maybe_unused)
{
-#ifndef CPUINFO_PROC
-#define CPUINFO_PROC {"model name", }
-#endif
const char *cpuinfo_procs[] = CPUINFO_PROC;
unsigned int i;
--
2.13.5
next prev parent reply other threads:[~2017-08-21 19:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 19:25 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 01/13] tools lib bpf: Fix double file test in Makefile Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 02/13] perf jevents: Support FCMask and PortMask Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 03/13] perf trace: Fix off by one string allocation problem Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 04/13] perf events parse: Remove some needless local variables Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 05/13] perf events parse: Rename parsing state struct to clearer name Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 06/13] perf events parse: Use just one parse events state struct Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 07/13] perf events parse: Rename parse_events_parse arguments Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 08/13] perf tools: Remove unused cpu_relax() macros Arnaldo Carvalho de Melo
2017-08-21 19:25 ` Arnaldo Carvalho de Melo [this message]
2017-08-21 19:25 ` [PATCH 10/13] perf annotate stdio: Support --show-nr-samples option Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 11/13] perf annotate: Document --show-total-period option Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 12/13] perf annotate browser: Support --show-nr-samples option Arnaldo Carvalho de Melo
2017-08-21 19:25 ` [PATCH 13/13] perf annotate browser: Circulate percent, total-period and nr-samples view Arnaldo Carvalho de Melo
2017-08-22 10:20 ` [GIT PULL 00/13] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170821192549.17251-10-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).