diff options
Diffstat (limited to 'tools/perf/util')
-rwxr-xr-x | tools/perf/util/PERF-VERSION-GEN | 2 | ||||
-rw-r--r-- | tools/perf/util/svghelper.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 6 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 10 |
4 files changed, 15 insertions, 5 deletions
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN index c561d1538c03..54552a00a117 100755 --- a/tools/perf/util/PERF-VERSION-GEN +++ b/tools/perf/util/PERF-VERSION-GEN | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | GVF=PERF-VERSION-FILE | 3 | GVF=PERF-VERSION-FILE |
4 | DEF_VER=v0.0.1.PERF | 4 | DEF_VER=v0.0.2.PERF |
5 | 5 | ||
6 | LF=' | 6 | LF=' |
7 | ' | 7 | ' |
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c index 856655d8b0b8..b3637db025a2 100644 --- a/tools/perf/util/svghelper.c +++ b/tools/perf/util/svghelper.c | |||
@@ -103,7 +103,7 @@ void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end) | |||
103 | fprintf(svgfile, " rect.process2 { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); | 103 | fprintf(svgfile, " rect.process2 { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); |
104 | fprintf(svgfile, " rect.sample { fill:rgb( 0, 0,255); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); | 104 | fprintf(svgfile, " rect.sample { fill:rgb( 0, 0,255); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); |
105 | fprintf(svgfile, " rect.blocked { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); | 105 | fprintf(svgfile, " rect.blocked { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); |
106 | fprintf(svgfile, " rect.waiting { fill:rgb(214,214, 0); fill-opacity:0.3; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); | 106 | fprintf(svgfile, " rect.waiting { fill:rgb(224,214, 0); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); |
107 | fprintf(svgfile, " rect.WAITING { fill:rgb(255,214, 48); fill-opacity:0.6; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); | 107 | fprintf(svgfile, " rect.WAITING { fill:rgb(255,214, 48); fill-opacity:0.6; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); |
108 | fprintf(svgfile, " rect.cpu { fill:rgb(192,192,192); fill-opacity:0.2; stroke-width:0.5; stroke:rgb(128,128,128); } \n"); | 108 | fprintf(svgfile, " rect.cpu { fill:rgb(192,192,192); fill-opacity:0.2; stroke-width:0.5; stroke:rgb(128,128,128); } \n"); |
109 | fprintf(svgfile, " rect.pstate { fill:rgb(128,128,128); fill-opacity:0.8; stroke-width:0; } \n"); | 109 | fprintf(svgfile, " rect.pstate { fill:rgb(128,128,128); fill-opacity:0.8; stroke-width:0; } \n"); |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 47ea0609a760..226f44a2357d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -413,7 +413,7 @@ static int dso__synthesize_plt_symbols(struct dso *self, int v) | |||
413 | if (fd < 0) | 413 | if (fd < 0) |
414 | goto out; | 414 | goto out; |
415 | 415 | ||
416 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 416 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
417 | if (elf == NULL) | 417 | if (elf == NULL) |
418 | goto out_close; | 418 | goto out_close; |
419 | 419 | ||
@@ -533,7 +533,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name, | |||
533 | Elf *elf; | 533 | Elf *elf; |
534 | int nr = 0, kernel = !strcmp("[kernel]", self->name); | 534 | int nr = 0, kernel = !strcmp("[kernel]", self->name); |
535 | 535 | ||
536 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 536 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
537 | if (elf == NULL) { | 537 | if (elf == NULL) { |
538 | if (v) | 538 | if (v) |
539 | fprintf(stderr, "%s: cannot read %s ELF file.\n", | 539 | fprintf(stderr, "%s: cannot read %s ELF file.\n", |
@@ -675,7 +675,7 @@ static char *dso__read_build_id(struct dso *self, int v) | |||
675 | if (fd < 0) | 675 | if (fd < 0) |
676 | goto out; | 676 | goto out; |
677 | 677 | ||
678 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 678 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
679 | if (elf == NULL) { | 679 | if (elf == NULL) { |
680 | if (v) | 680 | if (v) |
681 | fprintf(stderr, "%s: cannot read %s ELF file.\n", | 681 | fprintf(stderr, "%s: cannot read %s ELF file.\n", |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 6e8490716408..829da9edba64 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -27,6 +27,16 @@ static inline char *bfd_demangle(void __used *v, const char __used *c, | |||
27 | #endif | 27 | #endif |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | /* | ||
31 | * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; | ||
32 | * for newer versions we can use mmap to reduce memory usage: | ||
33 | */ | ||
34 | #ifdef LIBELF_NO_MMAP | ||
35 | # define PERF_ELF_C_READ_MMAP ELF_C_READ | ||
36 | #else | ||
37 | # define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP | ||
38 | #endif | ||
39 | |||
30 | #ifndef DMGL_PARAMS | 40 | #ifndef DMGL_PARAMS |
31 | #define DMGL_PARAMS (1 << 0) /* Include function args */ | 41 | #define DMGL_PARAMS (1 << 0) /* Include function args */ |
32 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ | 42 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ |