Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be1f13e3 authored by Namhyung Kim's avatar Namhyung Kim Committed by Jiri Olsa
Browse files

perf callchain: Add callchain_cursor_snapshot()



The callchain_cursor_snapshot() is for saving current status of the
callchain.  It'll be used to accumulate callchain information for each node.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Tested-by: default avatarArun Sharma <asharma@fb.com>
Tested-by: default avatarRodrigo Campos <rodrigo@sdfg.com.ar>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1401335910-16832-9-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent b4d3c8bd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -167,4 +167,13 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *

extern const char record_callchain_help[];
int parse_callchain_report_opt(const char *arg);

static inline void callchain_cursor_snapshot(struct callchain_cursor *dest,
					     struct callchain_cursor *src)
{
	*dest = *src;

	dest->first = src->curr;
	dest->nr -= src->pos;
}
#endif	/* __PERF_CALLCHAIN_H */