symbol.h (e3c55d406bd8df1a878546002c93db90c42be10c) | symbol.h (89fe808ae777728da6e1d78b7d13562792310d17) |
---|---|
1#ifndef __PERF_SYMBOL 2#define __PERF_SYMBOL 1 3 4#include <linux/types.h> 5#include <stdbool.h> 6#include <stdint.h> 7#include "map.h" 8#include "../perf.h" 9#include <linux/list.h> 10#include <linux/rbtree.h> 11#include <stdio.h> 12#include <byteswap.h> 13#include <libgen.h> 14#include "build-id.h" 15 | 1#ifndef __PERF_SYMBOL 2#define __PERF_SYMBOL 1 3 4#include <linux/types.h> 5#include <stdbool.h> 6#include <stdint.h> 7#include "map.h" 8#include "../perf.h" 9#include <linux/list.h> 10#include <linux/rbtree.h> 11#include <stdio.h> 12#include <byteswap.h> 13#include <libgen.h> 14#include "build-id.h" 15 |
16#ifdef LIBELF_SUPPORT | 16#ifdef HAVE_LIBELF_SUPPORT |
17#include <libelf.h> 18#include <gelf.h> 19#endif 20#include <elf.h> 21 22#include "dso.h" 23 | 17#include <libelf.h> 18#include <gelf.h> 19#endif 20#include <elf.h> 21 22#include "dso.h" 23 |
24#ifdef HAVE_CPLUS_DEMANGLE | 24#ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
25extern char *cplus_demangle(const char *, int); 26 27static inline char *bfd_demangle(void __maybe_unused *v, const char *c, int i) 28{ 29 return cplus_demangle(c, i); 30} 31#else 32#ifdef NO_DEMANGLE --- 8 unchanged lines hidden (view full) --- 41#include <bfd.h> 42#endif 43#endif 44 45/* 46 * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; 47 * for newer versions we can use mmap to reduce memory usage: 48 */ | 25extern char *cplus_demangle(const char *, int); 26 27static inline char *bfd_demangle(void __maybe_unused *v, const char *c, int i) 28{ 29 return cplus_demangle(c, i); 30} 31#else 32#ifdef NO_DEMANGLE --- 8 unchanged lines hidden (view full) --- 41#include <bfd.h> 42#endif 43#endif 44 45/* 46 * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; 47 * for newer versions we can use mmap to reduce memory usage: 48 */ |
49#ifdef LIBELF_MMAP | 49#ifdef HAVE_LIBELF_MMAP_SUPPORT |
50# define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP 51#else 52# define PERF_ELF_C_READ_MMAP ELF_C_READ 53#endif 54 55#ifndef DMGL_PARAMS 56#define DMGL_PARAMS (1 << 0) /* Include function args */ 57#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ --- 115 unchanged lines hidden (view full) --- 173 s32 cpu; 174}; 175 176struct symsrc { 177 char *name; 178 int fd; 179 enum dso_binary_type type; 180 | 50# define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP 51#else 52# define PERF_ELF_C_READ_MMAP ELF_C_READ 53#endif 54 55#ifndef DMGL_PARAMS 56#define DMGL_PARAMS (1 << 0) /* Include function args */ 57#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ --- 115 unchanged lines hidden (view full) --- 173 s32 cpu; 174}; 175 176struct symsrc { 177 char *name; 178 int fd; 179 enum dso_binary_type type; 180 |
181#ifdef LIBELF_SUPPORT | 181#ifdef HAVE_LIBELF_SUPPORT |
182 Elf *elf; 183 GElf_Ehdr ehdr; 184 185 Elf_Scn *opdsec; 186 size_t opdidx; 187 GElf_Shdr opdshdr; 188 189 Elf_Scn *symtab; --- 66 unchanged lines hidden --- | 182 Elf *elf; 183 GElf_Ehdr ehdr; 184 185 Elf_Scn *opdsec; 186 size_t opdidx; 187 GElf_Shdr opdshdr; 188 189 Elf_Scn *symtab; --- 66 unchanged lines hidden --- |