9 #include "util/cache.h"
10 #include "util/rbtree.h"
14 #include "util/parse-options.h"
15 #include "util/parse-events.h"
21 static char const *input_name
= "perf.data";
22 static char *vmlinux
= NULL
;
23 static char *sort_order
= "pid,symbol";
25 static int show_mask
= SHOW_KERNEL
| SHOW_USER
| SHOW_HV
;
27 static int dump_trace
= 0;
30 static unsigned long page_size
;
31 static unsigned long mmap_window
= 32;
33 const char *perf_event_names
[] = {
34 [PERF_EVENT_MMAP
] = " PERF_EVENT_MMAP",
35 [PERF_EVENT_MUNMAP
] = " PERF_EVENT_MUNMAP",
36 [PERF_EVENT_COMM
] = " PERF_EVENT_COMM",
40 struct perf_event_header header
;
45 struct perf_event_header header
;
50 char filename
[PATH_MAX
];
53 struct perf_event_header header
;
58 typedef union event_union
{
59 struct perf_event_header header
;
61 struct mmap_event mmap
;
62 struct comm_event comm
;
66 struct rb_node rb_node
;
72 static struct symbol
*symbol__new(uint64_t start
, uint64_t len
, const char *name
)
74 struct symbol
*self
= malloc(sizeof(*self
) + strlen(name
) + 1);
78 self
->end
= start
+ len
;
79 strcpy(self
->name
, name
);
85 static void symbol__delete(struct symbol
*self
)
90 static size_t symbol__fprintf(struct symbol
*self
, FILE *fp
)
92 return fprintf(fp
, " %llx-%llx %s\n",
93 self
->start
, self
->end
, self
->name
);
97 struct list_head node
;
102 static struct dso
*dso__new(const char *name
)
104 struct dso
*self
= malloc(sizeof(*self
) + strlen(name
) + 1);
107 strcpy(self
->name
, name
);
108 self
->syms
= RB_ROOT
;
114 static void dso__delete_symbols(struct dso
*self
)
117 struct rb_node
*next
= rb_first(&self
->syms
);
120 pos
= rb_entry(next
, struct symbol
, rb_node
);
121 next
= rb_next(&pos
->rb_node
);
126 static void dso__delete(struct dso
*self
)
128 dso__delete_symbols(self
);
132 static void dso__insert_symbol(struct dso
*self
, struct symbol
*sym
)
134 struct rb_node
**p
= &self
->syms
.rb_node
;
135 struct rb_node
*parent
= NULL
;
136 const uint64_t ip
= sym
->start
;
141 s
= rb_entry(parent
, struct symbol
, rb_node
);
147 rb_link_node(&sym
->rb_node
, parent
, p
);
148 rb_insert_color(&sym
->rb_node
, &self
->syms
);
151 static struct symbol
*dso__find_symbol(struct dso
*self
, uint64_t ip
)
158 n
= self
->syms
.rb_node
;
161 struct symbol
*s
= rb_entry(n
, struct symbol
, rb_node
);
165 else if (ip
> s
->end
)
175 * elf_symtab__for_each_symbol - iterate thru all the symbols
177 * @self: struct elf_symtab instance to iterate
178 * @index: uint32_t index
179 * @sym: GElf_Sym iterator
181 #define elf_symtab__for_each_symbol(syms, nr_syms, index, sym) \
182 for (index = 0, gelf_getsym(syms, index, &sym);\
184 index++, gelf_getsym(syms, index, &sym))
186 static inline uint8_t elf_sym__type(const GElf_Sym
*sym
)
188 return GELF_ST_TYPE(sym
->st_info
);
191 static inline int elf_sym__is_function(const GElf_Sym
*sym
)
193 return elf_sym__type(sym
) == STT_FUNC
&&
195 sym
->st_shndx
!= SHN_UNDEF
&&
199 static inline const char *elf_sym__name(const GElf_Sym
*sym
,
200 const Elf_Data
*symstrs
)
202 return symstrs
->d_buf
+ sym
->st_name
;
205 static Elf_Scn
*elf_section_by_name(Elf
*elf
, GElf_Ehdr
*ep
,
206 GElf_Shdr
*shp
, const char *name
,
212 while ((sec
= elf_nextscn(elf
, sec
)) != NULL
) {
215 gelf_getshdr(sec
, shp
);
216 str
= elf_strptr(elf
, ep
->e_shstrndx
, shp
->sh_name
);
217 if (!strcmp(name
, str
)) {
228 static int dso__load_sym(struct dso
*self
, int fd
, char *name
)
242 elf
= elf_begin(fd
, ELF_C_READ_MMAP
, NULL
);
244 fprintf(stderr
, "%s: cannot read %s ELF file.\n",
249 if (gelf_getehdr(elf
, &ehdr
) == NULL
) {
250 fprintf(stderr
, "%s: cannot get elf header.\n", __func__
);
254 sec
= elf_section_by_name(elf
, &ehdr
, &shdr
, ".symtab", NULL
);
256 sec
= elf_section_by_name(elf
, &ehdr
, &shdr
, ".dynsym", NULL
);
261 syms
= elf_getdata(sec
, NULL
);
265 sec
= elf_getscn(elf
, shdr
.sh_link
);
269 symstrs
= elf_getdata(sec
, NULL
);
273 nr_syms
= shdr
.sh_size
/ shdr
.sh_entsize
;
275 elf_symtab__for_each_symbol(syms
, nr_syms
, index
, sym
) {
278 if (!elf_sym__is_function(&sym
))
281 sec
= elf_getscn(elf
, sym
.st_shndx
);
285 gelf_getshdr(sec
, &shdr
);
286 sym
.st_value
-= shdr
.sh_addr
- shdr
.sh_offset
;
288 f
= symbol__new(sym
.st_value
, sym
.st_size
,
289 elf_sym__name(&sym
, symstrs
));
293 dso__insert_symbol(self
, f
);
305 static int dso__load(struct dso
*self
)
307 int size
= strlen(self
->name
) + sizeof("/usr/lib/debug%s.debug");
308 char *name
= malloc(size
);
320 snprintf(name
, size
, "/usr/lib/debug%s.debug", self
->name
);
323 snprintf(name
, size
, "/usr/lib/debug%s", self
->name
);
325 case 2: /* Sane people */
326 snprintf(name
, size
, "%s", self
->name
);
334 fd
= open(name
, O_RDONLY
);
337 ret
= dso__load_sym(self
, fd
, name
);
341 * Some people seem to have debuginfo files _WITHOUT_ debug info!?!?
351 static size_t dso__fprintf(struct dso
*self
, FILE *fp
)
353 size_t ret
= fprintf(fp
, "dso: %s\n", self
->name
);
356 for (nd
= rb_first(&self
->syms
); nd
; nd
= rb_next(nd
)) {
357 struct symbol
*pos
= rb_entry(nd
, struct symbol
, rb_node
);
358 ret
+= symbol__fprintf(pos
, fp
);
364 static LIST_HEAD(dsos
);
365 static struct dso
*kernel_dso
;
367 static void dsos__add(struct dso
*dso
)
369 list_add_tail(&dso
->node
, &dsos
);
372 static struct dso
*dsos__find(const char *name
)
376 list_for_each_entry(pos
, &dsos
, node
)
377 if (strcmp(pos
->name
, name
) == 0)
382 static struct dso
*dsos__findnew(const char *name
)
384 struct dso
*dso
= dsos__find(name
);
388 dso
= dso__new(name
);
394 fprintf(stderr
, "Failed to open: %s\n", name
);
399 "Failed to find debug symbols for: %s, maybe install a debug package?\n",
413 static void dsos__fprintf(FILE *fp
)
417 list_for_each_entry(pos
, &dsos
, node
)
418 dso__fprintf(pos
, fp
);
421 static int hex(char ch
)
423 if ((ch
>= '0') && (ch
<= '9'))
425 if ((ch
>= 'a') && (ch
<= 'f'))
426 return ch
- 'a' + 10;
427 if ((ch
>= 'A') && (ch
<= 'F'))
428 return ch
- 'A' + 10;
433 * While we find nice hex chars, build a long_val.
434 * Return number of chars processed.
436 static int hex2long(char *ptr
, unsigned long *long_val
)
442 const int hex_val
= hex(*p
);
447 *long_val
= (*long_val
<< 4) | hex_val
;
454 static int load_kallsyms(void)
456 struct rb_node
*nd
, *prevnd
;
461 kernel_dso
= dso__new("[kernel]");
462 if (kernel_dso
== NULL
)
465 file
= fopen("/proc/kallsyms", "r");
469 while (!feof(file
)) {
475 line_len
= getline(&line
, &n
, file
);
482 line
[--line_len
] = '\0'; /* \n */
484 len
= hex2long(line
, &start
);
487 if (len
+ 2 >= line_len
)
490 symbol_type
= toupper(line
[len
]);
492 * We're interested only in code ('T'ext)
494 if (symbol_type
!= 'T' && symbol_type
!= 'W')
497 * Well fix up the end later, when we have all sorted.
499 sym
= symbol__new(start
, 0xdead, line
+ len
+ 2);
504 dso__insert_symbol(kernel_dso
, sym
);
508 * Now that we have all sorted out, just set the ->end of all
511 prevnd
= rb_first(&kernel_dso
->syms
);
514 goto out_delete_line
;
516 for (nd
= rb_next(prevnd
); nd
; nd
= rb_next(nd
)) {
517 struct symbol
*prev
= rb_entry(prevnd
, struct symbol
, rb_node
),
518 *curr
= rb_entry(nd
, struct symbol
, rb_node
);
520 prev
->end
= curr
->start
- 1;
524 dsos__add(kernel_dso
);
533 dso__delete(kernel_dso
);
537 static int load_kernel(void)
544 fd
= open(vmlinux
, O_RDONLY
);
548 kernel_dso
= dso__new("[kernel]");
552 nr
= dso__load_sym(kernel_dso
, fd
, vmlinux
);
557 dsos__add(kernel_dso
);
563 dso__delete(kernel_dso
);
567 return load_kallsyms();
571 struct list_head node
;
578 static struct map
*map__new(struct mmap_event
*event
)
580 struct map
*self
= malloc(sizeof(*self
));
583 self
->start
= event
->start
;
584 self
->end
= event
->start
+ event
->len
;
585 self
->pgoff
= event
->pgoff
;
587 self
->dso
= dsos__findnew(event
->filename
);
588 if (self
->dso
== NULL
)
599 static const char *thread__name(struct thread
*self
, char *bf
, size_t size
);
602 struct rb_node rb_node
;
603 struct list_head maps
;
608 static const char *thread__name(struct thread
*self
, char *bf
, size_t size
)
613 snprintf(bf
, sizeof(bf
), ":%u", self
->pid
);
617 static struct thread
*thread__new(pid_t pid
)
619 struct thread
*self
= malloc(sizeof(*self
));
624 INIT_LIST_HEAD(&self
->maps
);
630 static int thread__set_comm(struct thread
*self
, const char *comm
)
632 self
->comm
= strdup(comm
);
633 return self
->comm
? 0 : -ENOMEM
;
636 static struct rb_root threads
;
638 static struct thread
*threads__findnew(pid_t pid
)
640 struct rb_node
**p
= &threads
.rb_node
;
641 struct rb_node
*parent
= NULL
;
646 th
= rb_entry(parent
, struct thread
, rb_node
);
657 th
= thread__new(pid
);
659 rb_link_node(&th
->rb_node
, parent
, p
);
660 rb_insert_color(&th
->rb_node
, &threads
);
665 static void thread__insert_map(struct thread
*self
, struct map
*map
)
667 list_add_tail(&map
->node
, &self
->maps
);
670 static struct map
*thread__find_map(struct thread
*self
, uint64_t ip
)
677 list_for_each_entry(pos
, &self
->maps
, node
)
678 if (ip
>= pos
->start
&& ip
<= pos
->end
)
685 * histogram, sorted on item, collects counts
688 static struct rb_root hist
;
691 struct rb_node rb_node
;
693 struct thread
*thread
;
704 * configurable sorting bits
708 struct list_head list
;
710 int64_t (*cmp
)(struct hist_entry
*, struct hist_entry
*);
711 size_t (*print_header
)(FILE *fp
);
712 size_t (*print
)(FILE *fp
, struct hist_entry
*);
716 sort__thread_cmp(struct hist_entry
*left
, struct hist_entry
*right
)
718 return right
->thread
->pid
- left
->thread
->pid
;
722 sort__thread_print(FILE *fp
, struct hist_entry
*self
)
726 return fprintf(fp
, " %16s",
727 thread__name(self
->thread
, bf
, sizeof(bf
)));
730 static struct sort_entry sort_thread
= {
731 .cmp
= sort__thread_cmp
,
732 .print
= sort__thread_print
,
736 sort__comm_cmp(struct hist_entry
*left
, struct hist_entry
*right
)
738 char *comm_l
= left
->thread
->comm
;
739 char *comm_r
= right
->thread
->comm
;
741 if (!comm_l
|| !comm_r
) {
742 if (!comm_l
&& !comm_r
)
750 return strcmp(comm_l
, comm_r
);
754 sort__comm_print(FILE *fp
, struct hist_entry
*self
)
756 return fprintf(fp
, " %16s", self
->thread
->comm
?: "<unknown>");
759 static struct sort_entry sort_comm
= {
760 .cmp
= sort__comm_cmp
,
761 .print
= sort__comm_print
,
765 sort__dso_cmp(struct hist_entry
*left
, struct hist_entry
*right
)
767 struct dso
*dso_l
= left
->dso
;
768 struct dso
*dso_r
= right
->dso
;
770 if (!dso_l
|| !dso_r
) {
771 if (!dso_l
&& !dso_r
)
779 return strcmp(dso_l
->name
, dso_r
->name
);
783 sort__dso_print(FILE *fp
, struct hist_entry
*self
)
785 return fprintf(fp
, " %64s", self
->dso
? self
->dso
->name
: "<unknown>");
788 static struct sort_entry sort_dso
= {
789 .cmp
= sort__dso_cmp
,
790 .print
= sort__dso_print
,
794 sort__sym_cmp(struct hist_entry
*left
, struct hist_entry
*right
)
798 if (left
->sym
== right
->sym
)
801 ip_l
= left
->sym
? left
->sym
->start
: left
->ip
;
802 ip_r
= right
->sym
? right
->sym
->start
: right
->ip
;
804 return (int64_t)(ip_r
- ip_l
);
807 static size_t sort__sym_print_header(FILE *fp
)
811 ret
+= fprintf(fp
, "#\n");
812 ret
+= fprintf(fp
, "# Overhead Command File: Symbol\n");
813 ret
+= fprintf(fp
, "# ........ ....... ............\n");
814 ret
+= fprintf(fp
, "#\n");
820 sort__sym_print(FILE *fp
, struct hist_entry
*self
)
824 ret
+= fprintf(fp
, " [%c] ", self
->level
);
827 ret
+= fprintf(fp
, " %#018llx", (unsigned long long)self
->ip
);
829 if (self
->level
!= '.')
830 ret
+= fprintf(fp
, " kernel: %s",
831 self
->sym
? self
->sym
->name
: "<unknown>");
833 ret
+= fprintf(fp
, " %s: %s",
834 self
->dso
? self
->dso
->name
: "<unknown>",
835 self
->sym
? self
->sym
->name
: "<unknown>");
840 static struct sort_entry sort_sym
= {
841 .cmp
= sort__sym_cmp
,
842 .print_header
= sort__sym_print_header
,
843 .print
= sort__sym_print
,
846 struct sort_dimension
{
848 struct sort_entry
*entry
;
852 static struct sort_dimension sort_dimensions
[] = {
853 { .name
= "pid", .entry
= &sort_thread
, },
854 { .name
= "comm", .entry
= &sort_comm
, },
855 { .name
= "dso", .entry
= &sort_dso
, },
856 { .name
= "symbol", .entry
= &sort_sym
, },
859 static LIST_HEAD(hist_entry__sort_list
);
861 static int sort_dimension__add(char *tok
)
865 for (i
= 0; i
< ARRAY_SIZE(sort_dimensions
); i
++) {
866 struct sort_dimension
*sd
= &sort_dimensions
[i
];
871 if (strcmp(tok
, sd
->name
))
874 list_add_tail(&sd
->entry
->list
, &hist_entry__sort_list
);
882 static void setup_sorting(void)
884 char *tmp
, *tok
, *str
= strdup(sort_order
);
886 for (tok
= strtok_r(str
, ", ", &tmp
);
887 tok
; tok
= strtok_r(NULL
, ", ", &tmp
))
888 sort_dimension__add(tok
);
894 hist_entry__cmp(struct hist_entry
*left
, struct hist_entry
*right
)
896 struct sort_entry
*se
;
899 list_for_each_entry(se
, &hist_entry__sort_list
, list
) {
900 cmp
= se
->cmp(left
, right
);
909 hist_entry__fprintf(FILE *fp
, struct hist_entry
*self
, uint64_t total_samples
)
911 struct sort_entry
*se
;
915 ret
= fprintf(fp
, " %5.2f%%",
916 (self
->count
* 100.0) / total_samples
);
918 ret
= fprintf(fp
, "%12d ", self
->count
);
920 list_for_each_entry(se
, &hist_entry__sort_list
, list
)
921 ret
+= se
->print(fp
, self
);
923 ret
+= fprintf(fp
, "\n");
929 * collect histogram counts
933 hist_entry__add(struct thread
*thread
, struct map
*map
, struct dso
*dso
,
934 struct symbol
*sym
, uint64_t ip
, char level
)
936 struct rb_node
**p
= &hist
.rb_node
;
937 struct rb_node
*parent
= NULL
;
938 struct hist_entry
*he
;
939 struct hist_entry entry
= {
952 he
= rb_entry(parent
, struct hist_entry
, rb_node
);
954 cmp
= hist_entry__cmp(&entry
, he
);
967 he
= malloc(sizeof(*he
));
971 rb_link_node(&he
->rb_node
, parent
, p
);
972 rb_insert_color(&he
->rb_node
, &hist
);
978 * reverse the map, sort on count.
981 static struct rb_root output_hists
;
983 static void output__insert_entry(struct hist_entry
*he
)
985 struct rb_node
**p
= &output_hists
.rb_node
;
986 struct rb_node
*parent
= NULL
;
987 struct hist_entry
*iter
;
991 iter
= rb_entry(parent
, struct hist_entry
, rb_node
);
993 if (he
->count
> iter
->count
)
999 rb_link_node(&he
->rb_node
, parent
, p
);
1000 rb_insert_color(&he
->rb_node
, &output_hists
);
1003 static void output__resort(void)
1005 struct rb_node
*next
= rb_first(&hist
);
1006 struct hist_entry
*n
;
1009 n
= rb_entry(next
, struct hist_entry
, rb_node
);
1010 next
= rb_next(&n
->rb_node
);
1012 rb_erase(&n
->rb_node
, &hist
);
1013 output__insert_entry(n
);
1017 static size_t output__fprintf(FILE *fp
, uint64_t total_samples
)
1019 struct hist_entry
*pos
;
1020 struct sort_entry
*se
;
1024 list_for_each_entry(se
, &hist_entry__sort_list
, list
) {
1025 if (se
->print_header
)
1026 ret
+= se
->print_header(fp
);
1029 for (nd
= rb_first(&output_hists
); nd
; nd
= rb_next(nd
)) {
1030 pos
= rb_entry(nd
, struct hist_entry
, rb_node
);
1031 ret
+= hist_entry__fprintf(fp
, pos
, total_samples
);
1038 static int __cmd_report(void)
1040 unsigned long offset
= 0;
1041 unsigned long head
= 0;
1045 int ret
, rc
= EXIT_FAILURE
;
1047 unsigned long total
= 0, total_mmap
= 0, total_comm
= 0, total_unknown
= 0;
1049 input
= open(input_name
, O_RDONLY
);
1051 perror("failed to open file");
1055 ret
= fstat(input
, &stat
);
1057 perror("failed to stat file");
1061 if (!stat
.st_size
) {
1062 fprintf(stderr
, "zero-sized file, nothing to do!\n");
1066 if (load_kernel() < 0) {
1067 perror("failed to open kallsyms");
1068 return EXIT_FAILURE
;
1072 buf
= (char *)mmap(NULL
, page_size
* mmap_window
, PROT_READ
,
1073 MAP_SHARED
, input
, offset
);
1074 if (buf
== MAP_FAILED
) {
1075 perror("failed to mmap file");
1080 event
= (event_t
*)(buf
+ head
);
1082 size
= event
->header
.size
;
1086 if (head
+ event
->header
.size
>= page_size
* mmap_window
) {
1087 unsigned long shift
= page_size
* (head
/ page_size
);
1090 ret
= munmap(buf
, page_size
* mmap_window
);
1098 size
= event
->header
.size
;
1102 if (event
->header
.misc
& PERF_EVENT_MISC_OVERFLOW
) {
1105 struct dso
*dso
= NULL
;
1106 struct thread
*thread
= threads__findnew(event
->ip
.pid
);
1107 uint64_t ip
= event
->ip
.ip
;
1108 struct map
*map
= NULL
;
1111 fprintf(stderr
, "%p [%p]: PERF_EVENT (IP, %d): %d: %p\n",
1112 (void *)(offset
+ head
),
1113 (void *)(long)(event
->header
.size
),
1119 if (thread
== NULL
) {
1120 fprintf(stderr
, "problem processing %d event, skipping it.\n",
1121 event
->header
.type
);
1125 if (event
->header
.misc
& PERF_EVENT_MISC_KERNEL
) {
1131 } else if (event
->header
.misc
& PERF_EVENT_MISC_USER
) {
1136 map
= thread__find_map(thread
, ip
);
1139 ip
-= map
->start
+ map
->pgoff
;
1147 if (show
& show_mask
) {
1148 struct symbol
*sym
= dso__find_symbol(dso
, ip
);
1150 if (hist_entry__add(thread
, map
, dso
, sym
, ip
, level
)) {
1152 "problem incrementing symbol count, skipping event\n");
1157 } else switch (event
->header
.type
) {
1158 case PERF_EVENT_MMAP
: {
1159 struct thread
*thread
= threads__findnew(event
->mmap
.pid
);
1160 struct map
*map
= map__new(&event
->mmap
);
1163 fprintf(stderr
, "%p [%p]: PERF_EVENT_MMAP: [%p(%p) @ %p]: %s\n",
1164 (void *)(offset
+ head
),
1165 (void *)(long)(event
->header
.size
),
1166 (void *)(long)event
->mmap
.start
,
1167 (void *)(long)event
->mmap
.len
,
1168 (void *)(long)event
->mmap
.pgoff
,
1169 event
->mmap
.filename
);
1171 if (thread
== NULL
|| map
== NULL
) {
1172 fprintf(stderr
, "problem processing PERF_EVENT_MMAP, skipping event.\n");
1175 thread__insert_map(thread
, map
);
1179 case PERF_EVENT_COMM
: {
1180 struct thread
*thread
= threads__findnew(event
->comm
.pid
);
1183 fprintf(stderr
, "%p [%p]: PERF_EVENT_COMM: %s:%d\n",
1184 (void *)(offset
+ head
),
1185 (void *)(long)(event
->header
.size
),
1186 event
->comm
.comm
, event
->comm
.pid
);
1188 if (thread
== NULL
||
1189 thread__set_comm(thread
, event
->comm
.comm
)) {
1190 fprintf(stderr
, "problem processing PERF_EVENT_COMM, skipping event.\n");
1199 fprintf(stderr
, "%p [%p]: skipping unknown header type: %d\n",
1200 (void *)(offset
+ head
),
1201 (void *)(long)(event
->header
.size
),
1202 event
->header
.type
);
1207 * assume we lost track of the stream, check alignment, and
1208 * increment a single u64 in the hope to catch on again 'soon'.
1211 if (unlikely(head
& 7))
1220 if (offset
+ head
< stat
.st_size
)
1227 fprintf(stderr
, " IP events: %10ld\n", total
);
1228 fprintf(stderr
, " mmap events: %10ld\n", total_mmap
);
1229 fprintf(stderr
, " comm events: %10ld\n", total_comm
);
1230 fprintf(stderr
, " unknown events: %10ld\n", total_unknown
);
1236 dsos__fprintf(stdout
);
1239 output__fprintf(stdout
, total
);
1244 static const char * const report_usage
[] = {
1245 "perf report [<options>] <command>",
1249 static const struct option options
[] = {
1250 OPT_STRING('i', "input", &input_name
, "file",
1252 OPT_BOOLEAN('v', "verbose", &verbose
,
1253 "be more verbose (show symbol address, etc)"),
1254 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace
,
1255 "dump raw trace in ASCII"),
1256 OPT_STRING('k', "vmlinux", &vmlinux
, "file", "vmlinux pathname"),
1257 OPT_STRING('s', "sort", &sort_order
, "foo", "bar"),
1261 int cmd_report(int argc
, const char **argv
, const char *prefix
)
1263 elf_version(EV_CURRENT
);
1265 page_size
= getpagesize();
1267 parse_options(argc
, argv
, options
, report_usage
, 0);
1273 return __cmd_report();