1 /* 2 * thread-stack.h: Synthesize a thread's stack using call / return events 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_THREAD_STACK_H 17 #define __PERF_THREAD_STACK_H 18 19 #include <sys/types.h> 20 21 #include <linux/types.h> 22 23 struct thread; 24 struct ip_callchain; 25 26 int thread_stack__event(struct thread *thread, u32 flags, u64 from_ip, 27 u64 to_ip, u16 insn_len, u64 trace_nr); 28 void thread_stack__sample(struct thread *thread, struct ip_callchain *chain, 29 size_t sz, u64 ip); 30 void thread_stack__free(struct thread *thread); 31 32 #endif 33