Merge tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc
[deliverable/linux.git] / tools / perf / util / unwind.h
CommitLineData
71ad0f5e
JO
1#ifndef __UNWIND_H
2#define __UNWIND_H
3
d944c4ee 4#include <linux/types.h>
71ad0f5e
JO
5#include "event.h"
6#include "symbol.h"
66f066d8 7#include "thread.h"
71ad0f5e
JO
8
9struct unwind_entry {
10 struct map *map;
11 struct symbol *sym;
12 u64 ip;
13};
14
15typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
16
9ff125d1 17#ifdef HAVE_DWARF_UNWIND_SUPPORT
71ad0f5e 18int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
71ad0f5e 19 struct thread *thread,
37676af1 20 struct perf_sample *data, int max_stack);
9ff125d1
JO
21/* libunwind specific */
22#ifdef HAVE_LIBUNWIND_SUPPORT
ea3da69d 23int libunwind__arch_reg_id(int regnum);
66f066d8 24int unwind__prepare_access(struct thread *thread);
380b5143 25void unwind__flush_access(struct thread *thread);
66f066d8
NK
26void unwind__finish_access(struct thread *thread);
27#else
28static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
29{
30 return 0;
31}
32
380b5143 33static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
66f066d8 34static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
9ff125d1 35#endif
71ad0f5e
JO
36#else
37static inline int
1d037ca1
IT
38unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
39 void *arg __maybe_unused,
1d037ca1 40 struct thread *thread __maybe_unused,
37676af1
ACM
41 struct perf_sample *data __maybe_unused,
42 int max_stack __maybe_unused)
71ad0f5e
JO
43{
44 return 0;
45}
66f066d8
NK
46
47static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
48{
49 return 0;
50}
51
380b5143 52static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
66f066d8 53static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
9ff125d1 54#endif /* HAVE_DWARF_UNWIND_SUPPORT */
71ad0f5e 55#endif /* __UNWIND_H */
This page took 0.184542 seconds and 5 git commands to generate.