lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Jun 2016 01:50:14 -0700
From:	tip-bot for He Kuang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	adrian.hunter@...el.com, sukadev@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org, ak@...ux.intel.com,
	tumanova@...ux.vnet.ibm.com, wangnan0@...wei.com, jolsa@...nel.org,
	mingo@...nel.org, hpa@...or.com, tglx@...utronix.de,
	eranian@...gle.com, mhiramat@...nel.org, dsahern@...il.com,
	alexander.shishkin@...ux.intel.com, jpoimboe@...hat.com,
	peterz@...radead.org, hekuang@...wei.com, kan.liang@...el.com,
	acme@...hat.com, penberg@...nel.org, namhyung@...nel.org
Subject: [tip:perf/core] perf unwind: Change fixed name of
 libunwind__arch_reg_id to macro

Commit-ID:  eeb118c5d77878948e09308afe4fd9d0efe68ef7
Gitweb:     http://git.kernel.org/tip/eeb118c5d77878948e09308afe4fd9d0efe68ef7
Author:     He Kuang <hekuang@...wei.com>
AuthorDate: Fri, 3 Jun 2016 03:33:20 +0000
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 7 Jun 2016 15:11:46 -0300

perf unwind: Change fixed name of libunwind__arch_reg_id to macro

For local libunwind, it uses the fixed methods to convert register id
according to the host platform, but in remote libunwind, this convert
function should be the one for remote architecture. This patch changes
the fixed name to macro and code for each remote platform can be
compiled indivadually.

Signed-off-by: He Kuang <hekuang@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ekaterina Tumanova <tumanova@...ux.vnet.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Kan Liang <kan.liang@...el.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/1464924803-22214-12-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/unwind-libunwind-local.c | 2 +-
 tools/perf/util/unwind.h                 | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 9c70486..631b40d 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -508,7 +508,7 @@ static int access_reg(unw_addr_space_t __maybe_unused as,
 		return 0;
 	}
 
-	id = libunwind__arch_reg_id(regnum);
+	id = LIBUNWIND__ARCH_REG_ID(regnum);
 	if (id < 0)
 		return -EINVAL;
 
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index bf9f593..b074662 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -29,7 +29,10 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 			struct perf_sample *data, int max_stack);
 /* libunwind specific */
 #ifdef HAVE_LIBUNWIND_SUPPORT
-int libunwind__arch_reg_id(int regnum);
+#ifndef LIBUNWIND__ARCH_REG_ID
+#define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arch_reg_id(regnum)
+#endif
+int LIBUNWIND__ARCH_REG_ID(int regnum);
 int unwind__prepare_access(struct thread *thread, struct map *map);
 void unwind__flush_access(struct thread *thread);
 void unwind__finish_access(struct thread *thread);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ