callchain.c (510457ec9dc259b002879bcfe475f89d4514a0fc) callchain.c (8e99b6d4533cf3f49dcd813155a513a5b572baef)
1/*
2 * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com>
3 *
4 * Handle the callchains from the stream in an ad-hoc radix tree and then
5 * sort them in an rbtree.
6 *
7 * Using a radix for code path provides a fast retrieval and factorizes
8 * memory use. Also that lets us use the paths in a hierarchical graph view.

--- 290 unchanged lines hidden (view full) ---

299 free(buf);
300 return ret;
301}
302
303int perf_callchain_config(const char *var, const char *value)
304{
305 char *endptr;
306
1/*
2 * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com>
3 *
4 * Handle the callchains from the stream in an ad-hoc radix tree and then
5 * sort them in an rbtree.
6 *
7 * Using a radix for code path provides a fast retrieval and factorizes
8 * memory use. Also that lets us use the paths in a hierarchical graph view.

--- 290 unchanged lines hidden (view full) ---

299 free(buf);
300 return ret;
301}
302
303int perf_callchain_config(const char *var, const char *value)
304{
305 char *endptr;
306
307 if (prefixcmp(var, "call-graph."))
307 if (!strstarts(var, "call-graph."))
308 return 0;
309 var += sizeof("call-graph.") - 1;
310
311 if (!strcmp(var, "record-mode"))
312 return parse_callchain_record_opt(value, &callchain_param);
313 if (!strcmp(var, "dump-size")) {
314 unsigned long size = 0;
315 int ret;

--- 1157 unchanged lines hidden ---
308 return 0;
309 var += sizeof("call-graph.") - 1;
310
311 if (!strcmp(var, "record-mode"))
312 return parse_callchain_record_opt(value, &callchain_param);
313 if (!strcmp(var, "dump-size")) {
314 unsigned long size = 0;
315 int ret;

--- 1157 unchanged lines hidden ---