linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>
Subject: [PATCH 22/38] perf callchain: Use session__find_addr_location() and friends
Date: Tue,  3 Mar 2015 12:07:34 +0900	[thread overview]
Message-ID: <1425352070-1115-23-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1425352070-1115-1-git-send-email-namhyung@kernel.org>

Pass session struct to callchain resolve routines and find correct
thread/map/symbol using proper functions.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-script.c                        |  4 +--
 tools/perf/tests/dwarf-unwind.c                    |  2 +-
 tools/perf/util/callchain.c                        |  6 ++--
 tools/perf/util/callchain.h                        |  4 ++-
 tools/perf/util/hist.c                             |  5 +--
 tools/perf/util/machine.c                          | 41 +++++++++++++---------
 tools/perf/util/machine.h                          |  1 +
 .../util/scripting-engines/trace-event-python.c    | 27 +++++++-------
 tools/perf/util/session.c                          |  6 ++--
 tools/perf/util/session.h                          |  2 +-
 tools/perf/util/unwind-libdw.c                     | 14 ++++----
 tools/perf/util/unwind-libdw.h                     |  1 +
 tools/perf/util/unwind-libunwind.c                 | 32 +++++++++--------
 tools/perf/util/unwind.h                           |  3 +-
 14 files changed, 86 insertions(+), 62 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 65b3a07be2bf..90a401a52868 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -429,7 +429,7 @@ static void print_sample_bts(union perf_event *event,
 				print_opts &= ~PRINT_IP_OPT_SRCLINE;
 			}
 		}
-		perf_evsel__print_ip(evsel, sample, al, print_opts,
+		perf_evsel__print_ip(evsel, sample, session, al, print_opts,
 				     PERF_MAX_STACK_DEPTH);
 	}
 
@@ -483,7 +483,7 @@ static void process_event(union perf_event *event, struct perf_sample *sample,
 		else
 			printf("\n");
 
-		perf_evsel__print_ip(evsel, sample, al,
+		perf_evsel__print_ip(evsel, sample, session, al,
 				     output[attr->type].print_ip_opts,
 				     PERF_MAX_STACK_DEPTH);
 	}
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index 7e04feb431cb..241270374e93 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -75,7 +75,7 @@ static int unwind_thread(struct thread *thread)
 		goto out;
 	}
 
-	err = unwind__get_entries(unwind_entry, &cnt, thread,
+	err = unwind__get_entries(unwind_entry, &cnt, thread, NULL,
 				  &sample, MAX_STACK);
 	if (err)
 		pr_debug("unwind failed\n");
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 9f643ee77001..f95b27037dc8 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -757,7 +757,9 @@ int callchain_cursor_append(struct callchain_cursor *cursor,
 	return 0;
 }
 
-int sample__resolve_callchain(struct perf_sample *sample, struct symbol **parent,
+int sample__resolve_callchain(struct perf_sample *sample,
+			      struct perf_session *session,
+			      struct symbol **parent,
 			      struct perf_evsel *evsel, struct addr_location *al,
 			      int max_stack)
 {
@@ -767,7 +769,7 @@ int sample__resolve_callchain(struct perf_sample *sample, struct symbol **parent
 	if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain ||
 	    sort__has_parent) {
 		return thread__resolve_callchain(al->thread, evsel, sample,
-						 parent, al, max_stack);
+						 session, parent, al, max_stack);
 	}
 	return 0;
 }
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 6033a0a212ca..ca9048f84cb5 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -165,7 +165,9 @@ struct hist_entry;
 int record_parse_callchain_opt(const struct option *opt, const char *arg, int unset);
 int record_callchain_opt(const struct option *opt, const char *arg, int unset);
 
-int sample__resolve_callchain(struct perf_sample *sample, struct symbol **parent,
+int sample__resolve_callchain(struct perf_sample *sample,
+			      struct perf_session *session,
+			      struct symbol **parent,
 			      struct perf_evsel *evsel, struct addr_location *al,
 			      int max_stack);
 int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *sample);
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 0d189ae76922..dbe7f3744bf1 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -861,8 +861,9 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
 {
 	int err, err2;
 
-	err = sample__resolve_callchain(iter->sample, &iter->parent,
-					iter->evsel, al, max_stack_depth);
+	err = sample__resolve_callchain(iter->sample, iter->session,
+					&iter->parent, iter->evsel, al,
+					max_stack_depth);
 	if (err)
 		return err;
 
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 4743718d4bf1..63d860dca74b 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1540,10 +1540,11 @@ struct mem_info *sample__resolve_mem(struct perf_sample *sample,
 }
 
 static int add_callchain_ip(struct thread *thread,
+			    struct perf_session *session,
 			    struct symbol **parent,
 			    struct addr_location *root_al,
 			    bool branch_history,
-			    u64 ip)
+			    u64 ip, u64 timestamp)
 {
 	struct addr_location al;
 
@@ -1551,8 +1552,9 @@ static int add_callchain_ip(struct thread *thread,
 	al.sym = NULL;
 
 	if (branch_history)
-		thread__find_cpumode_addr_location(thread, MAP__FUNCTION,
-						   ip, &al);
+		session__find_cpumode_addr_location(session, thread,
+						    MAP__FUNCTION, ip, &al,
+						    timestamp);
 	else {
 		u8 cpumode = PERF_RECORD_MISC_USER;
 
@@ -1579,8 +1581,8 @@ static int add_callchain_ip(struct thread *thread,
 			}
 			return 0;
 		}
-		thread__find_addr_location(thread, cpumode, MAP__FUNCTION,
-				   ip, &al);
+		session__find_addr_location(session,thread, cpumode,
+					    MAP__FUNCTION, ip, &al, timestamp);
 	}
 
 	if (al.sym != NULL) {
@@ -1670,6 +1672,7 @@ static int remove_loops(struct branch_entry *l, int nr)
  */
 static int resolve_lbr_callchain_sample(struct thread *thread,
 					struct perf_sample *sample,
+					struct perf_session *session,
 					struct symbol **parent,
 					struct addr_location *root_al,
 					int max_stack)
@@ -1722,7 +1725,8 @@ static int resolve_lbr_callchain_sample(struct thread *thread,
 					ip = lbr_stack->entries[0].to;
 			}
 
-			err = add_callchain_ip(thread, parent, root_al, false, ip);
+			err = add_callchain_ip(thread, session, parent, root_al,
+					       false, ip, sample->time);
 			if (err)
 				return (err < 0) ? err : 0;
 		}
@@ -1735,6 +1739,7 @@ static int resolve_lbr_callchain_sample(struct thread *thread,
 static int thread__resolve_callchain_sample(struct thread *thread,
 					    struct perf_evsel *evsel,
 					    struct perf_sample *sample,
+					    struct perf_session *session,
 					    struct symbol **parent,
 					    struct addr_location *root_al,
 					    int max_stack)
@@ -1742,6 +1747,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 	struct branch_stack *branch = sample->branch_stack;
 	struct ip_callchain *chain = sample->callchain;
 	int chain_nr = min(max_stack, (int)chain->nr);
+	u64 timestamp = sample->time;
 	int i, j, err;
 	int skip_idx = -1;
 	int first_call = 0;
@@ -1749,8 +1755,8 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 	callchain_cursor_reset(&callchain_cursor);
 
 	if (has_branch_callstack(evsel)) {
-		err = resolve_lbr_callchain_sample(thread, sample, parent,
-						   root_al, max_stack);
+		err = resolve_lbr_callchain_sample(thread, sample, session,
+						   parent, root_al, max_stack);
 		if (err)
 			return (err < 0) ? err : 0;
 	}
@@ -1806,11 +1812,12 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 		nr = remove_loops(be, nr);
 
 		for (i = 0; i < nr; i++) {
-			err = add_callchain_ip(thread, parent, root_al,
-					       true, be[i].to);
+			err = add_callchain_ip(thread, session, parent, root_al,
+					       true, be[i].to, timestamp);
 			if (!err)
-				err = add_callchain_ip(thread, parent, root_al,
-						       true, be[i].from);
+				err = add_callchain_ip(thread, session, parent,
+						       root_al, true,
+						       be[i].from, timestamp);
 			if (err == -EINVAL)
 				break;
 			if (err)
@@ -1839,7 +1846,8 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 #endif
 		ip = chain->ips[j];
 
-		err = add_callchain_ip(thread, parent, root_al, false, ip);
+		err = add_callchain_ip(thread, session, parent, root_al, false,
+				       ip, timestamp);
 		if (err)
 			return (err < 0) ? err : 0;
 	}
@@ -1857,12 +1865,13 @@ static int unwind_entry(struct unwind_entry *entry, void *arg)
 int thread__resolve_callchain(struct thread *thread,
 			      struct perf_evsel *evsel,
 			      struct perf_sample *sample,
+			      struct perf_session *session,
 			      struct symbol **parent,
 			      struct addr_location *root_al,
 			      int max_stack)
 {
-	int ret = thread__resolve_callchain_sample(thread, evsel,
-						   sample, parent,
+	int ret = thread__resolve_callchain_sample(thread, evsel, sample,
+						   session, parent,
 						   root_al, max_stack);
 	if (ret)
 		return ret;
@@ -1878,7 +1887,7 @@ int thread__resolve_callchain(struct thread *thread,
 		return 0;
 
 	return unwind__get_entries(unwind_entry, &callchain_cursor,
-				   thread, sample, max_stack);
+				   thread, session, sample, max_stack);
 
 }
 
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 45aee0c329ef..38ead24f0f47 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -129,6 +129,7 @@ struct mem_info *sample__resolve_mem(struct perf_sample *sample,
 int thread__resolve_callchain(struct thread *thread,
 			      struct perf_evsel *evsel,
 			      struct perf_sample *sample,
+			      struct perf_session *session,
 			      struct symbol **parent,
 			      struct addr_location *root_al,
 			      int max_stack);
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 802def46af7b..e8c2896055c5 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -298,9 +298,10 @@ static PyObject *get_field_numeric_entry(struct event_format *event,
 }
 
 
-static PyObject *python_process_callchain(struct perf_sample *sample,
-					 struct perf_evsel *evsel,
-					 struct addr_location *al)
+static PyObject *python_process_callchain(struct perf_session *session,
+					  struct perf_sample *sample,
+					  struct perf_evsel *evsel,
+					  struct addr_location *al)
 {
 	PyObject *pylist;
 
@@ -311,9 +312,8 @@ static PyObject *python_process_callchain(struct perf_sample *sample,
 	if (!symbol_conf.use_callchain || !sample->callchain)
 		goto exit;
 
-	if (thread__resolve_callchain(al->thread, evsel,
-				      sample, NULL, NULL,
-				      PERF_MAX_STACK_DEPTH) != 0) {
+	if (thread__resolve_callchain(al->thread, evsel, sample, session,
+				      NULL, NULL, PERF_MAX_STACK_DEPTH) != 0) {
 		pr_err("Failed to resolve callchain. Skipping\n");
 		goto exit;
 	}
@@ -374,7 +374,8 @@ static PyObject *python_process_callchain(struct perf_sample *sample,
 }
 
 
-static void python_process_tracepoint(struct perf_sample *sample,
+static void python_process_tracepoint(struct perf_session *session,
+				      struct perf_sample *sample,
 				      struct perf_evsel *evsel,
 				      struct thread *thread,
 				      struct addr_location *al)
@@ -424,7 +425,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
 	PyTuple_SetItem(t, n++, context);
 
 	/* ip unwinding */
-	callchain = python_process_callchain(sample, evsel, al);
+	callchain = python_process_callchain(session, sample, evsel, al);
 
 	if (handler) {
 		PyTuple_SetItem(t, n++, PyInt_FromLong(cpu));
@@ -759,7 +760,8 @@ static int python_process_call_return(struct call_return *cr, void *data)
 	return db_export__call_return(dbe, cr);
 }
 
-static void python_process_general_event(struct perf_sample *sample,
+static void python_process_general_event(struct perf_session *session,
+					 struct perf_sample *sample,
 					 struct perf_evsel *evsel,
 					 struct thread *thread,
 					 struct addr_location *al)
@@ -822,7 +824,7 @@ static void python_process_general_event(struct perf_sample *sample,
 	}
 
 	/* ip unwinding */
-	callchain = python_process_callchain(sample, evsel, al);
+	callchain = python_process_callchain(session, sample, evsel, al);
 	pydict_set_item_string_decref(dict, "callchain", callchain);
 
 	PyTuple_SetItem(t, n++, dict);
@@ -846,7 +848,7 @@ static void python_process_event(union perf_event *event,
 
 	switch (evsel->attr.type) {
 	case PERF_TYPE_TRACEPOINT:
-		python_process_tracepoint(sample, evsel, thread, al);
+		python_process_tracepoint(session, sample, evsel, thread, al);
 		break;
 	/* Reserve for future process_hw/sw/raw APIs */
 	default:
@@ -854,7 +856,8 @@ static void python_process_event(union perf_event *event,
 			db_export__sample(&tables->dbe, event, sample, evsel,
 					  thread, al, session);
 		else
-			python_process_general_event(sample, evsel, thread, al);
+			python_process_general_event(session, sample, evsel,
+						     thread, al);
 	}
 }
 
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 46761a39fbae..d89dfa8592a9 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1550,7 +1550,7 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
 }
 
 void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
-			  struct addr_location *al,
+			  struct perf_session *session, struct addr_location *al,
 			  unsigned int print_opts, unsigned int stack_depth)
 {
 	struct callchain_cursor_node *node;
@@ -1565,8 +1565,8 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
 	if (symbol_conf.use_callchain && sample->callchain) {
 		struct addr_location node_al;
 
-		if (thread__resolve_callchain(al->thread, evsel,
-					      sample, NULL, NULL,
+		if (thread__resolve_callchain(al->thread, evsel, sample,
+					      session, NULL, NULL,
 					      PERF_MAX_STACK_DEPTH) != 0) {
 			if (verbose)
 				error("Failed to resolve callchain. Skipping\n");
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index dbd21f8e7cf1..4d264fef8968 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -102,7 +102,7 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
 					    unsigned int type);
 
 void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
-			  struct addr_location *al,
+			  struct perf_session *session, struct addr_location *al,
 			  unsigned int print_opts, unsigned int stack_depth);
 
 int perf_session__cpu_bitmap(struct perf_session *session,
diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index 2dcfe9a7c8d0..ebaf51b58c92 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -8,6 +8,7 @@
 #include "unwind-libdw.h"
 #include "machine.h"
 #include "thread.h"
+#include "session.h"
 #include <linux/types.h>
 #include "event.h"
 #include "perf_regs.h"
@@ -26,10 +27,9 @@ static int __report_module(struct addr_location *al, u64 ip,
 	Dwfl_Module *mod;
 	struct dso *dso = NULL;
 
-	thread__find_addr_location(ui->thread,
-				   PERF_RECORD_MISC_USER,
-				   MAP__FUNCTION, ip, al);
-
+	session__find_addr_location(ui->session, ui->thread,
+				    PERF_RECORD_MISC_USER, MAP__FUNCTION,
+				    ip, al, ui->sample->time);
 	if (al->map)
 		dso = al->map->dso;
 
@@ -89,8 +89,8 @@ static int access_dso_mem(struct unwind_info *ui, Dwarf_Addr addr,
 	struct addr_location al;
 	ssize_t size;
 
-	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
-			      MAP__FUNCTION, addr, &al);
+	session__find_addr_map(ui->session, ui->thread, PERF_RECORD_MISC_USER,
+			       MAP__FUNCTION, addr, &al, ui->sample->time);
 	if (!al.map) {
 		pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
 		return -1;
@@ -165,12 +165,14 @@ frame_callback(Dwfl_Frame *state, void *arg)
 
 int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 			struct thread *thread,
+			struct perf_session *session,
 			struct perf_sample *data,
 			int max_stack)
 {
 	struct unwind_info ui = {
 		.sample		= data,
 		.thread		= thread,
+		.session 	= session,
 		.machine	= thread->mg->machine,
 		.cb		= cb,
 		.arg		= arg,
diff --git a/tools/perf/util/unwind-libdw.h b/tools/perf/util/unwind-libdw.h
index 417a1426f3ad..806e522713a2 100644
--- a/tools/perf/util/unwind-libdw.h
+++ b/tools/perf/util/unwind-libdw.h
@@ -11,6 +11,7 @@ bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
 struct unwind_info {
 	Dwfl			*dwfl;
 	struct perf_sample      *sample;
+	struct perf_session     *session;
 	struct machine          *machine;
 	struct thread           *thread;
 	unwind_entry_cb_t	cb;
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index e3c40a520a25..9ee63179383e 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -86,6 +86,7 @@ UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug,
 
 struct unwind_info {
 	struct perf_sample	*sample;
+	struct perf_session	*session;
 	struct machine		*machine;
 	struct thread		*thread;
 };
@@ -315,8 +316,8 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui)
 {
 	struct addr_location al;
 
-	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
-			      MAP__FUNCTION, ip, &al);
+	session__find_addr_map(ui->session, ui->thread, PERF_RECORD_MISC_USER,
+			       MAP__FUNCTION, ip, &al, ui->sample->time);
 	return al.map;
 }
 
@@ -406,20 +407,19 @@ get_proc_name(unw_addr_space_t __maybe_unused as,
 static int access_dso_mem(struct unwind_info *ui, unw_word_t addr,
 			  unw_word_t *data)
 {
-	struct addr_location al;
+	struct map *map;
 	ssize_t size;
 
-	thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER,
-			      MAP__FUNCTION, addr, &al);
-	if (!al.map) {
+	map = find_map(addr, ui);
+	if (!map) {
 		pr_debug("unwind: no map for %lx\n", (unsigned long)addr);
 		return -1;
 	}
 
-	if (!al.map->dso)
+	if (!map->dso)
 		return -1;
 
-	size = dso__data_read_addr(al.map->dso, al.map, ui->machine,
+	size = dso__data_read_addr(map->dso, map, ui->machine,
 				   addr, (u8 *) data, sizeof(*data));
 
 	return !(size == sizeof(*data));
@@ -511,14 +511,14 @@ static void put_unwind_info(unw_addr_space_t __maybe_unused as,
 	pr_debug("unwind: put_unwind_info called\n");
 }
 
-static int entry(u64 ip, struct thread *thread,
-		 unwind_entry_cb_t cb, void *arg)
+static int entry(u64 ip, struct thread *thread, struct perf_session *session,
+		 u64 timestamp, unwind_entry_cb_t cb, void *arg)
 {
 	struct unwind_entry e;
 	struct addr_location al;
 
-	thread__find_addr_location(thread, PERF_RECORD_MISC_USER,
-				   MAP__FUNCTION, ip, &al);
+	session__find_addr_location(session, thread, PERF_RECORD_MISC_USER,
+				    MAP__FUNCTION, ip, &al, timestamp);
 
 	e.ip = ip;
 	e.map = al.map;
@@ -620,20 +620,22 @@ static int get_entries(struct unwind_info *ui, unwind_entry_cb_t cb,
 		unw_word_t ip;
 
 		unw_get_reg(&c, UNW_REG_IP, &ip);
-		ret = ip ? entry(ip, ui->thread, cb, arg) : 0;
+		ret = ip ? entry(ip, ui->thread, ui->session,
+				 ui->sample->time, cb, arg) : 0;
 	}
 
 	return ret;
 }
 
 int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
-			struct thread *thread,
+			struct thread *thread, struct perf_session *session,
 			struct perf_sample *data, int max_stack)
 {
 	u64 ip;
 	struct unwind_info ui = {
 		.sample       = data,
 		.thread       = thread,
+		.session      = session,
 		.machine      = thread->mg->machine,
 	};
 	int ret;
@@ -645,7 +647,7 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 	if (ret)
 		return ret;
 
-	ret = entry(ip, thread, cb, arg);
+	ret = entry(ip, thread, session, data->time, cb, arg);
 	if (ret)
 		return -ENOMEM;
 
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index 12790cf94618..c619890e60ad 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -16,7 +16,7 @@ typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
 
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
 int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
-			struct thread *thread,
+			struct thread *thread, struct perf_session *session,
 			struct perf_sample *data, int max_stack);
 /* libunwind specific */
 #ifdef HAVE_LIBUNWIND_SUPPORT
@@ -38,6 +38,7 @@ static inline int
 unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
 		    void *arg __maybe_unused,
 		    struct thread *thread __maybe_unused,
+		    struct perf_session *session __maybe_unused,
 		    struct perf_sample *data __maybe_unused,
 		    int max_stack __maybe_unused)
 {
-- 
2.2.2


  parent reply	other threads:[~2015-03-03  3:15 UTC|newest]

Thread overview: 221+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  3:07 [RFC/PATCHSET 00/38] perf tools: Speed-up perf report by using multi thread (v3) Namhyung Kim
2015-03-03  3:07 ` [PATCH 01/38] perf tools: Use a software dummy event to track task/mmap events Namhyung Kim
2015-03-03  3:07 ` [PATCH 02/38] perf tools: Add rm_rf() utility function Namhyung Kim
2015-03-03  3:07 ` [PATCH 03/38] perf tools: Introduce copyfile_offset() function Namhyung Kim
2015-03-04 14:58   ` Jiri Olsa
2015-03-03  3:07 ` [PATCH 04/38] perf tools: Create separate mmap for dummy tracking event Namhyung Kim
2015-03-03  3:07 ` [PATCH 05/38] perf tools: Introduce perf_evlist__mmap_track() Namhyung Kim
2015-03-03  3:07 ` [PATCH 06/38] perf tools: Add HEADER_DATA_INDEX feature Namhyung Kim
2015-03-03  3:07 ` [PATCH 07/38] perf tools: Handle indexed data file properly Namhyung Kim
2015-03-04 16:19   ` Jiri Olsa
2015-03-06  4:17     ` Namhyung Kim
2015-03-03  3:07 ` [PATCH 08/38] perf record: Add --index option for building index table Namhyung Kim
2015-03-05  7:56   ` Jiri Olsa
2015-03-06  4:19     ` Namhyung Kim
2015-03-03  3:07 ` [PATCH 09/38] perf report: Skip dummy tracking event Namhyung Kim
2015-03-03  3:07 ` [PATCH 10/38] perf tools: Pass session arg to perf_event__preprocess_sample() Namhyung Kim
2015-03-03 13:59   ` Arnaldo Carvalho de Melo
2015-03-03 14:18     ` Namhyung Kim
2015-03-03  3:07 ` [PATCH 11/38] perf script: Pass session arg to ->process_event callback Namhyung Kim
2015-03-03  3:07 ` [PATCH 12/38] perf tools: Introduce thread__comm_time() helpers Namhyung Kim
2015-03-03 16:28   ` Frederic Weisbecker
2015-03-04  0:02     ` Namhyung Kim
2015-03-05 16:08       ` Frederic Weisbecker
2015-03-06  4:38         ` Namhyung Kim
2015-03-06 12:48           ` Arnaldo Carvalho de Melo
2015-03-10  6:55             ` Namhyung Kim
2015-03-03  3:07 ` [PATCH 13/38] perf tools: Add a test case for thread comm handling Namhyung Kim
2015-03-03  3:07 ` [PATCH 14/38] perf tools: Use thread__comm_time() when adding hist entries Namhyung Kim
2015-03-03  3:07 ` [PATCH 15/38] perf tools: Convert dead thread list into rbtree Namhyung Kim
2015-03-03  3:07 ` [PATCH 16/38] perf tools: Introduce machine__find*_thread_time() Namhyung Kim
2015-03-03  3:07 ` [PATCH 17/38] perf tools: Add a test case for timed thread handling Namhyung Kim
2015-03-03  3:07 ` [PATCH 18/38] perf tools: Reducing arguments of hist_entry_iter__add() Namhyung Kim
2015-03-03  3:07 ` [PATCH 19/38] perf tools: Pass session to hist_entry_iter struct Namhyung Kim
2015-03-03  3:07 ` [PATCH 20/38] perf tools: Maintain map groups list in a leader thread Namhyung Kim
2015-03-03  3:07 ` [PATCH 21/38] perf tools: Introduce session__find_addr_location() and friends Namhyung Kim
2015-03-03  3:07 ` Namhyung Kim [this message]
2015-03-03 14:01   ` [PATCH 22/38] perf callchain: Use " Arnaldo Carvalho de Melo
2015-03-03  3:07 ` [PATCH 23/38] perf tools: Add a test case for timed map groups handling Namhyung Kim
2015-03-03  3:07 ` [PATCH 24/38] perf tools: Protect dso symbol loading using a mutex Namhyung Kim
2015-03-03  3:07 ` [PATCH 25/38] perf tools: Protect dso cache tree using dso->lock Namhyung Kim
2015-03-03  3:07 ` [PATCH 26/38] perf tools: Protect dso cache fd with a mutex Namhyung Kim
2015-03-03  3:07 ` [PATCH 27/38] perf callchain: Maintain libunwind's address space in map_groups Namhyung Kim
2015-03-03  3:07 ` [PATCH 28/38] perf tools: Add dso__data_get/put_fd() Namhyung Kim
2015-03-03  3:07 ` [PATCH 29/38] perf session: Pass struct events stats to event processing functions Namhyung Kim
2015-03-03  3:07 ` [PATCH 30/38] perf hists: Pass hists struct to hist_entry_iter struct Namhyung Kim
2015-03-03  3:07 ` [PATCH 31/38] perf tools: Move BUILD_ID_SIZE definition to perf.h Namhyung Kim
2015-03-03  3:07 ` [PATCH 32/38] perf report: Parallelize perf report using multi-thread Namhyung Kim
2015-03-03  3:07 ` [PATCH 33/38] perf tools: Add missing_threads rb tree Namhyung Kim
2015-03-03  3:07 ` [PATCH 34/38] perf record: Synthesize COMM event for a command line workload Namhyung Kim
2015-03-03  3:07 ` [PATCH 35/38] perf tools: Fix progress ui to support multi thread Namhyung Kim
2015-03-03  3:07 ` [PATCH 36/38] perf report: Add --multi-thread option and config item Namhyung Kim
2015-03-03  3:07 ` [PATCH 37/38] perf session: Handle index files generally Namhyung Kim
2015-03-03  3:07 ` [PATCH 38/38] perf data: Implement 'index' subcommand Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2015-05-18  0:30 [RFC/PATCHSET 00/40] perf tools: Speed-up perf report by using multi thread (v4) Namhyung Kim
2015-05-18  0:30 ` [PATCH 01/40] perf tools: Use a software dummy event to track task/mmap events Namhyung Kim
2015-05-18  0:30 ` [PATCH 02/40] perf tools: Add rm_rf() utility function Namhyung Kim
2015-05-18  0:30 ` [PATCH 03/40] perf tools: Introduce copyfile_offset() function Namhyung Kim
2015-05-18 12:57   ` Arnaldo Carvalho de Melo
2015-05-19  6:20     ` Namhyung Kim
2015-05-20 12:24   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-05-18  0:30 ` [PATCH 04/40] perf tools: Create separate mmap for dummy tracking event Namhyung Kim
2015-05-18 18:07   ` Jiri Olsa
2015-05-19  6:24     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 05/40] perf tools: Introduce perf_evlist__mmap_track() Namhyung Kim
2015-05-18 18:09   ` Jiri Olsa
2015-05-19  6:28     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 06/40] perf tools: Add HEADER_DATA_INDEX feature Namhyung Kim
2015-05-18 18:17   ` Jiri Olsa
2015-05-19  6:34     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 07/40] perf tools: Handle indexed data file properly Namhyung Kim
2015-05-18 18:37   ` Jiri Olsa
2015-05-19  6:40     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 08/40] perf record: Add --index option for building index table Namhyung Kim
2015-05-18  0:30 ` [PATCH 09/40] perf report: Skip dummy tracking event Namhyung Kim
2015-05-18  0:30 ` [PATCH 10/40] perf tools: Introduce thread__comm(_str)_by_time() helpers Namhyung Kim
2015-05-18  0:30 ` [PATCH 11/40] perf tools: Add a test case for thread comm handling Namhyung Kim
2015-05-18 19:29   ` Jiri Olsa
2015-05-19  6:42     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 12/40] perf tools: Use thread__comm_by_time() when adding hist entries Namhyung Kim
2015-05-18  0:30 ` [PATCH 13/40] perf tools: Convert dead thread list into rbtree Namhyung Kim
2015-05-18 19:34   ` Jiri Olsa
2015-05-19  6:45     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 14/40] perf tools: Introduce machine__find*_thread_by_time() Namhyung Kim
2015-05-18 19:50   ` Jiri Olsa
2015-05-18 19:56     ` Jiri Olsa
2015-05-19  6:57     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 15/40] perf tools: Add a test case for timed thread handling Namhyung Kim
2015-05-18  0:30 ` [PATCH 16/40] perf tools: Reducing arguments of hist_entry_iter__add() Namhyung Kim
2015-05-18 12:55   ` Arnaldo Carvalho de Melo
2015-05-19  7:01     ` Namhyung Kim
2015-05-19  8:04       ` [PATCH] " Namhyung Kim
2015-05-19 14:03         ` Arnaldo Carvalho de Melo
2015-05-27 16:47         ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
2015-05-18  0:30 ` [PATCH 17/40] perf tools: Maintain map groups list in a leader thread Namhyung Kim
2015-05-18  0:30 ` [PATCH 18/40] perf tools: Introduce thread__find_addr_location_by_time() and friends Namhyung Kim
2015-05-18  0:30 ` [PATCH 19/40] perf callchain: Use " Namhyung Kim
2015-05-18  0:30 ` [PATCH 20/40] perf tools: Add a test case for timed map groups handling Namhyung Kim
2015-05-18  0:30 ` [PATCH 21/40] perf tools: Save timestamp of a map creation Namhyung Kim
2015-05-18  0:30 ` [PATCH 22/40] perf tools: Introduce map_groups__{insert,find}_by_time() Namhyung Kim
2015-05-18  0:30 ` [PATCH 23/40] perf tools: Use map_groups__find_addr_by_time() Namhyung Kim
2015-05-18  0:30 ` [PATCH 24/40] perf tools: Add testcase for managing maps with time Namhyung Kim
2015-05-18  0:30 ` [PATCH 25/40] perf tools: Protect dso symbol loading using a mutex Namhyung Kim
2015-05-20 12:25   ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
2015-05-18  0:30 ` [PATCH 26/40] perf tools: Protect dso cache tree using dso->lock Namhyung Kim
2015-05-20 12:25   ` [tip:perf/core] perf symbols: Protect dso cache tree using dso-> lock tip-bot for Namhyung Kim
2015-05-18  0:30 ` [PATCH 27/40] perf tools: Protect dso cache fd with a mutex Namhyung Kim
2015-05-20 12:25   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-05-18  0:30 ` [PATCH 28/40] perf callchain: Maintain libunwind's address space in map_groups Namhyung Kim
2015-05-18  0:30 ` [PATCH 29/40] perf tools: Add dso__data_get/put_fd() Namhyung Kim
2015-05-18  0:30 ` [PATCH 30/40] perf session: Pass struct events stats to event processing functions Namhyung Kim
2015-05-18  0:30 ` [PATCH 31/40] perf hists: Pass hists struct to hist_entry_iter struct Namhyung Kim
2015-05-18  0:30 ` [PATCH 32/40] perf tools: Move BUILD_ID_SIZE definition to perf.h Namhyung Kim
2015-05-18  0:30 ` [PATCH 33/40] perf session: Separate struct machines from session Namhyung Kim
2015-05-18 12:52   ` Arnaldo Carvalho de Melo
2015-05-19  7:28     ` Namhyung Kim
2015-05-19 22:46       ` Arnaldo Carvalho de Melo
2015-05-19 23:58         ` Namhyung Kim
2015-05-28  2:39           ` [RFC 0/2] " Namhyung Kim
2015-05-28  2:39             ` [PATCH 1/2] perf tools: Introduce machines__new/delete() Namhyung Kim
2015-05-28  2:39             ` [PATCH 2/2] perf session: Separate struct machines from session Namhyung Kim
2015-05-18  0:30 ` [PATCH 34/40] perf report: Parallelize perf report using multi-thread Namhyung Kim
2015-05-19 10:12   ` Jiri Olsa
2015-05-19 14:58     ` Namhyung Kim
2015-05-18  0:30 ` [PATCH 35/40] perf record: Synthesize COMM event for a command line workload Namhyung Kim
2015-05-18 12:45   ` Arnaldo Carvalho de Melo
2015-05-19  7:46     ` Namhyung Kim
2015-05-19 14:02       ` Arnaldo Carvalho de Melo
2015-05-19 15:12         ` Namhyung Kim
2015-05-19 16:30           ` Arnaldo Carvalho de Melo
2015-05-19 19:49           ` Jiri Olsa
2015-05-19 20:18             ` Arnaldo Carvalho de Melo
2015-05-19 23:56               ` Namhyung Kim
2015-05-20  0:22                 ` Arnaldo Carvalho de Melo
2015-05-20  0:56                   ` Namhyung Kim
2015-05-20  1:16                     ` Arnaldo Carvalho de Melo
2015-05-18  0:30 ` [PATCH 36/40] perf tools: Fix progress ui to support multi thread Namhyung Kim
2015-05-18  0:30 ` [PATCH 37/40] perf report: Add --multi-thread option and config item Namhyung Kim
2015-05-18  0:30 ` [PATCH 38/40] perf session: Handle index files generally Namhyung Kim
2015-05-19 22:27   ` David Ahern
2015-05-20  0:05     ` Namhyung Kim
2015-05-20  7:20       ` [PATCH 41/40] perf report: Add --num-thread option to control number of thread Namhyung Kim
2015-05-18  0:30 ` [PATCH 39/40] perf data: Implement 'index' subcommand Namhyung Kim
2015-05-18  0:30 ` [PATCH Not-for-merge 40/40] perf tools: Disable thread refcount due to bug Namhyung Kim
2015-05-18  1:23   ` Arnaldo Carvalho de Melo
2015-05-18 12:21     ` Namhyung Kim
2015-05-18 12:30       ` Arnaldo Carvalho de Melo
2015-01-29  8:06 [RFC/PATCHSET 00/42] perf tools: Speed-up perf report by using multi thread (v2) Namhyung Kim
2015-01-29  8:06 ` [PATCH 01/42] perf tools: Support to read compressed module from build-id cache Namhyung Kim
2015-01-30 14:32   ` Jiri Olsa
2015-02-02 15:03     ` Namhyung Kim
2015-01-30 18:33   ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 02/42] perf tools: Do not use __perf_session__process_events() directly Namhyung Kim
2015-01-30 18:32   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 03/42] perf record: Show precise number of samples Namhyung Kim
2015-01-30 18:32   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 04/42] perf header: Set header version correctly Namhyung Kim
2015-01-30 18:33   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 05/42] perf tools: Set attr.task bit for a tracking event Namhyung Kim
2015-01-30 18:33   ` [tip:perf/core] perf evsel: " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 06/42] perf tools: Use a software dummy event to track task/mmap events Namhyung Kim
2015-01-29  8:06 ` [PATCH 07/42] perf tools: Use perf_data_file__fd() consistently Namhyung Kim
2015-01-30 18:33   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 08/42] perf tools: Add rm_rf() utility function Namhyung Kim
2015-01-30 15:02   ` Jiri Olsa
2015-05-20 12:24     ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-01-29  8:06 ` [PATCH 09/42] perf tools: Introduce copyfile_offset() function Namhyung Kim
2015-01-29  8:06 ` [PATCH 10/42] perf tools: Create separate mmap for dummy tracking event Namhyung Kim
2015-01-29  8:06 ` [PATCH 11/42] perf tools: Introduce perf_evlist__mmap_track() Namhyung Kim
2015-01-29  8:06 ` [PATCH 12/42] perf tools: Add HEADER_DATA_INDEX feature Namhyung Kim
2015-01-29  8:06 ` [PATCH 13/42] perf tools: Handle indexed data file properly Namhyung Kim
2015-01-29  8:06 ` [PATCH 14/42] perf record: Add --index option for building index table Namhyung Kim
2015-02-01 18:06   ` Jiri Olsa
2015-02-02  8:34     ` Adrian Hunter
2015-02-02  9:15       ` Jiri Olsa
2015-02-02  9:52         ` Adrian Hunter
2015-02-02 10:05           ` Jiri Olsa
2015-02-02 12:07             ` Adrian Hunter
2015-02-02 12:13               ` Jiri Olsa
2015-02-02 14:56                 ` Namhyung Kim
2015-02-02 17:30                   ` Jiri Olsa
2015-02-03  8:42                     ` Adrian Hunter
2015-01-29  8:06 ` [PATCH 15/42] perf report: Skip dummy tracking event Namhyung Kim
2015-01-29  8:06 ` [PATCH 16/42] perf tools: Pass session arg to perf_event__preprocess_sample() Namhyung Kim
2015-01-29  8:06 ` [PATCH 17/42] perf script: Pass session arg to ->process_event callback Namhyung Kim
2015-01-29  8:06 ` [PATCH 18/42] perf tools: Introduce thread__comm_time() helpers Namhyung Kim
2015-01-29  8:07 ` [PATCH 19/42] perf tools: Add a test case for thread comm handling Namhyung Kim
2015-01-29  8:07 ` [PATCH 20/42] perf tools: Use thread__comm_time() when adding hist entries Namhyung Kim
2015-01-29  8:07 ` [PATCH 21/42] perf tools: Convert dead thread list into rbtree Namhyung Kim
2015-01-29  8:07 ` [PATCH 22/42] perf tools: Introduce machine__find*_thread_time() Namhyung Kim
2015-01-29  8:07 ` [PATCH 23/42] perf tools: Add a test case for timed thread handling Namhyung Kim
2015-01-29  8:07 ` [PATCH 24/42] perf tools: Maintain map groups list in a leader thread Namhyung Kim
2015-01-29  8:07 ` [PATCH 25/42] perf tools: Introduce thread__find_addr_location_time() and friends Namhyung Kim
2015-01-29  8:07 ` [PATCH 26/42] perf tools: Add a test case for timed map groups handling Namhyung Kim
2015-01-29  8:07 ` [PATCH 27/42] perf tools: Protect dso symbol loading using a mutex Namhyung Kim
2015-01-29 12:34   ` Arnaldo Carvalho de Melo
2015-01-29 12:48     ` Namhyung Kim
2015-01-29  8:07 ` [PATCH 28/42] perf tools: Protect dso cache tree using dso->lock Namhyung Kim
2015-01-29  8:07 ` [PATCH 29/42] perf tools: Protect dso cache fd with a mutex Namhyung Kim
2015-01-29 12:31   ` Arnaldo Carvalho de Melo
2015-01-29 13:19     ` Namhyung Kim
2015-01-29 16:23       ` Arnaldo Carvalho de Melo
2015-01-30  0:51         ` Namhyung Kim
2015-01-29  8:07 ` [PATCH 30/42] perf session: Pass struct events stats to event processing functions Namhyung Kim
2015-01-29  8:07 ` [PATCH 31/42] perf hists: Pass hists struct to hist_entry_iter functions Namhyung Kim
2015-01-29  8:07 ` [PATCH 32/42] perf tools: Move BUILD_ID_SIZE definition to perf.h Namhyung Kim
2015-01-29  8:07 ` [PATCH 33/42] perf report: Parallelize perf report using multi-thread Namhyung Kim
2015-01-29  8:07 ` [PATCH 34/42] perf tools: Add missing_threads rb tree Namhyung Kim
2015-01-29  8:07 ` [PATCH 35/42] perf record: Synthesize COMM event for a command line workload Namhyung Kim
2015-01-29  8:07 ` [PATCH 36/42] perf tools: Fix progress ui to support multi thread Namhyung Kim
2015-01-29  8:07 ` [PATCH 37/42] perf report: Add --multi-thread option and config item Namhyung Kim
2015-01-29  8:07 ` [PATCH 38/42] perf session: Handle index files generally Namhyung Kim
2015-01-29  8:07 ` [PATCH 39/42] perf tools: Convert lseek + read to pread Namhyung Kim
2015-01-30 18:34   ` [tip:perf/core] perf symbols: " tip-bot for Namhyung Kim
2015-01-29  8:07 ` [PATCH 40/42] perf callchain: Save eh/debug frame offset for dwarf unwind Namhyung Kim
2015-01-29 12:38   ` Arnaldo Carvalho de Melo
2015-01-29 13:23     ` Namhyung Kim
2015-01-29 19:22   ` Arnaldo Carvalho de Melo
2015-01-30 18:32   ` [tip:perf/core] perf callchain: Cache eh/ debug " tip-bot for Namhyung Kim
2015-01-29  8:07 ` [PATCH 41/42] perf tools: Add new perf data command Namhyung Kim
2015-01-29  8:07 ` [PATCH 42/42] perf data: Implement 'index' subcommand Namhyung Kim
2015-01-29 19:56 ` [RFC/PATCHSET 00/42] perf tools: Speed-up perf report by using multi thread (v2) Arnaldo Carvalho de Melo

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=1425352070-1115-23-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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).