Linux Audio

Check our new training course

Loading...
v3.15
 1#ifndef __UNWIND_H
 2#define __UNWIND_H
 3
 4#include "types.h"
 5#include "event.h"
 6#include "symbol.h"
 
 7
 8struct unwind_entry {
 9	struct map	*map;
10	struct symbol	*sym;
11	u64		ip;
12};
13
14typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
15
16#ifdef HAVE_DWARF_UNWIND_SUPPORT
17int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
18			struct machine *machine,
19			struct thread *thread,
20			struct perf_sample *data, int max_stack);
21/* libunwind specific */
22#ifdef HAVE_LIBUNWIND_SUPPORT
23int libunwind__arch_reg_id(int regnum);
 
 
 
 
 
 
 
 
 
 
 
24#endif
25#else
26static inline int
27unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
28		    void *arg __maybe_unused,
29		    struct machine *machine __maybe_unused,
30		    struct thread *thread __maybe_unused,
31		    struct perf_sample *data __maybe_unused,
32		    int max_stack __maybe_unused)
33{
34	return 0;
35}
 
 
 
 
 
 
 
 
36#endif /* HAVE_DWARF_UNWIND_SUPPORT */
37#endif /* __UNWIND_H */
v4.6
 1#ifndef __UNWIND_H
 2#define __UNWIND_H
 3
 4#include <linux/types.h>
 5#include "event.h"
 6#include "symbol.h"
 7#include "thread.h"
 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
17#ifdef HAVE_DWARF_UNWIND_SUPPORT
18int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 
19			struct thread *thread,
20			struct perf_sample *data, int max_stack);
21/* libunwind specific */
22#ifdef HAVE_LIBUNWIND_SUPPORT
23int libunwind__arch_reg_id(int regnum);
24int unwind__prepare_access(struct thread *thread);
25void unwind__flush_access(struct thread *thread);
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
33static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
34static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
35#endif
36#else
37static inline int
38unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
39		    void *arg __maybe_unused,
 
40		    struct thread *thread __maybe_unused,
41		    struct perf_sample *data __maybe_unused,
42		    int max_stack __maybe_unused)
43{
44	return 0;
45}
46
47static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
48{
49	return 0;
50}
51
52static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
53static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
54#endif /* HAVE_DWARF_UNWIND_SUPPORT */
55#endif /* __UNWIND_H */