mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 00:54:41 +08:00
5da5025858
The copy we were using came from another copy I did for the dwarves (pahole) package, that came from the kernel years ago. The only function that is used by the perf tools and that isn't in the kernel is list_del_range, that I'm leaving in the perf tools only for now. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20090701174608.GA5823@ghostprotocols.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
37 lines
788 B
C
37 lines
788 B
C
#ifndef __PERF_CALLCHAIN_H
|
|
#define __PERF_CALLCHAIN_H
|
|
|
|
#include "../perf.h"
|
|
#include <linux/list.h>
|
|
#include <linux/rbtree.h>
|
|
#include "symbol.h"
|
|
|
|
|
|
struct callchain_node {
|
|
struct callchain_node *parent;
|
|
struct list_head brothers;
|
|
struct list_head children;
|
|
struct list_head val;
|
|
struct rb_node rb_node;
|
|
unsigned int val_nr;
|
|
u64 hit;
|
|
};
|
|
|
|
struct callchain_list {
|
|
u64 ip;
|
|
struct symbol *sym;
|
|
struct list_head list;
|
|
};
|
|
|
|
static inline void callchain_init(struct callchain_node *node)
|
|
{
|
|
INIT_LIST_HEAD(&node->brothers);
|
|
INIT_LIST_HEAD(&node->children);
|
|
INIT_LIST_HEAD(&node->val);
|
|
}
|
|
|
|
void append_chain(struct callchain_node *root, struct ip_callchain *chain,
|
|
struct symbol **syms);
|
|
void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node);
|
|
#endif
|