Linux Perf
call-path.h
Go to the documentation of this file.
1
/*
2
* call-path.h: Manipulate a tree data structure containing function call paths
3
* Copyright (c) 2014, Intel Corporation.
4
*
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms and conditions of the GNU General Public License,
7
* version 2, as published by the Free Software Foundation.
8
*
9
* This program is distributed in the hope it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
*/
15
16
#ifndef __PERF_CALL_PATH_H
17
#define __PERF_CALL_PATH_H
18
19
#include <sys/types.h>
20
21
#include <linux/types.h>
22
#include <linux/rbtree.h>
23
37
struct
call_path
{
38
struct
call_path
*
parent
;
39
struct
symbol
*
sym
;
40
u64
ip
;
41
u64
db_id
;
42
bool
in_kernel
;
43
struct
rb_node
rb_node
;
44
struct
rb_root
children
;
45
};
46
47
#define CALL_PATH_BLOCK_SHIFT 8
48
#define CALL_PATH_BLOCK_SIZE (1 << CALL_PATH_BLOCK_SHIFT)
49
#define CALL_PATH_BLOCK_MASK (CALL_PATH_BLOCK_SIZE - 1)
50
51
struct
call_path_block
{
52
struct
call_path
cp[
CALL_PATH_BLOCK_SIZE
];
53
struct
list_head
node
;
54
};
55
63
struct
call_path_root
{
64
struct
call_path
call_path
;
65
struct
list_head
blocks
;
66
size_t
next
;
67
size_t
sz
;
68
};
69
70
struct
call_path_root
*
call_path_root__new
(
void
);
71
void
call_path_root__free
(
struct
call_path_root
*cpr);
72
73
struct
call_path
*
call_path__findnew
(
struct
call_path_root
*cpr,
74
struct
call_path
*
parent
,
75
struct
symbol
*
sym
, u64
ip
, u64 ks);
76
77
#endif
call_path__findnew
struct call_path * call_path__findnew(struct call_path_root *cpr, struct call_path *parent, struct symbol *sym, u64 ip, u64 ks)
Definition:
call-path.c:85
call_path_root__new
struct call_path_root * call_path_root__new(void)
Definition:
call-path.c:34
node
Definition:
mem2node.c:7
call_path::children
struct rb_root children
Definition:
call-path.h:44
call_path::rb_node
struct rb_node rb_node
Definition:
call-path.h:43
call_path_root__free
void call_path_root__free(struct call_path_root *cpr)
Definition:
call-path.c:46
call_path::db_id
u64 db_id
Definition:
call-path.h:41
call_path
Definition:
call-path.h:37
call_path::parent
struct call_path * parent
Definition:
call-path.h:38
call_path::in_kernel
bool in_kernel
Definition:
call-path.h:42
call_path_root
Definition:
call-path.h:63
blocks
u64 blocks
Definition:
block-range.c:7
call_path_root::sz
size_t sz
Definition:
call-path.h:67
call_path_root::next
size_t next
Definition:
call-path.h:66
call_path::sym
struct symbol * sym
Definition:
call-path.h:39
symbol
Definition:
symbol.h:55
call_path_block
Definition:
call-path.h:51
CALL_PATH_BLOCK_SIZE
#define CALL_PATH_BLOCK_SIZE
Definition:
call-path.h:48
call_path::ip
u64 ip
Definition:
call-path.h:40
util
call-path.h
Generated by
1.8.13