Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbaANFbG (ORCPT ); Tue, 14 Jan 2014 00:31:06 -0500 Received: from LGEMRELSE1Q.lge.com ([156.147.1.111]:51192 "EHLO LGEMRELSE1Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbaANF0E (ORCPT ); Tue, 14 Jan 2014 00:26:04 -0500 X-AuditID: 9c93016f-b7b1aae000000f15-9e-52d4ca677182 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Jiri Olsa , Rodrigo Campos , Andi Kleen , Arun Sharma , Frederic Weisbecker Subject: [PATCH 10/24] perf callchain: Add callchain_cursor_snapshot() Date: Tue, 14 Jan 2014 14:25:43 +0900 Message-Id: <1389677157-30513-11-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1389677157-30513-1-git-send-email-namhyung@kernel.org> References: <1389677157-30513-1-git-send-email-namhyung@kernel.org> X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The callchain_cursor_snapshot() is for saving current status of the callchain. It'll be used to accumulate callchain information for each node. Cc: Arun Sharma Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/callchain.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 66faae21370d..bbd63dfbe112 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -159,4 +159,13 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node * bool hide_unresolved); extern const char record_callchain_help[]; + +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 */ -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/