/* * call-path.h: Manipulate a tree data structure containing function call paths * Copyright (c) 2014, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * */ #ifndef __PERF_CALL_PATH_H #define __PERF_CALL_PATH_H #include #include #include /** * struct call_path - node in list of calls leading to a function call. * @parent: call path to the parent function call * @sym: symbol of function called * @ip: only if sym is null, the ip of the function * @db_id: id used for db-export * @in_kernel: whether function is a in the kernel * @rb_node: node in parent's tree of called functions * @children: tree of call paths of functions called * * In combination with the call_return structure, the call_path structure * defines a context-sensitve call-graph. */ struct call_path { struct call_path *parent; struct symbol *sym; u64 ip; u64 db_id; bool in_kernel; struct rb_node rb_node; struct rb_root children; }; #define CALL_PATH_BLOCK_SHIFT 8 #define CALL_PATH_BLOCK_SIZE (1 << CALL_PATH_BLOCK_SHIFT) #define CALL_PATH_BLOCK_MASK (CALL_PATH_BLOCK_SIZE - 1) struct call_path_block { struct call_path cp[CALL_PATH_BLOCK_SIZE]; struct list_head node; }; /** * struct call_path_root - root of all call paths. * @call_path: root call path * @blocks: list of blocks to store call paths * @next: next free space * @sz: number of spaces */ struct call_path_root { struct call_path call_path; struct list_head blocks; size_t next; size_t sz; }; struct call_path_root *call_path_root__new(void); void call_path_root__free(struct call_path_root *cpr); struct call_path *call_path__findnew(struct call_path_root *cpr, struct call_path *parent, struct symbol *sym, u64 ip, u64 ks); #endif 8'>diff
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-01-09 14:20:48 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2017-01-10 10:57:13 +0100
commit711059b9752ad09ae6bcd4be8e48d30e5db483d8 (patch)
tree3b8968687791bb4e12572b74309361509f71ab44 /include
parentaf5d27c4e12b804c065c0e7c87507fea5683dab4 (diff)
xfrm: add and use xfrm_state_afinfo_get_rcu
xfrm_init_tempstate is always called from within rcu read side section. We can thus use a simpler function that doesn't call rcu_read_lock again. While at it, also make xfrm_init_tempstate return value void, the return value was never tested. A followup patch will replace remaining callers of xfrm_state_get_afinfo with xfrm_state_afinfo_get_rcu variant and then remove the 'old' get_afinfo interface. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/xfrm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h