Skip to content

Commit 4383db8

Browse files
Jiri Olsaacmel
authored andcommitted
perf tools: Move BUILD_ID_SIZE into build-id object
Moving BUILD_ID_SIZE define into build-id object, plus include related changes. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Namhyung Kim <namhyung@kernel.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1351372712-21104-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent ebb296c commit 4383db8

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎tools/perf/builtin-buildid-cache.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "util/parse-options.h"
1515
#include "util/strlist.h"
1616
#include "util/build-id.h"
17+
#include "util/symbol.h"
1718

1819
static int build_id_cache__add_file(const char *filename, const char *debugdir)
1920
{

‎tools/perf/util/annotate.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "debug.h"
1616
#include "annotate.h"
1717
#include <pthread.h>
18+
#include <linux/bitops.h>
1819

1920
const char *disassembler_style;
2021
const char *objdump_path;

‎tools/perf/util/build-id.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#ifndef PERF_BUILD_ID_H_
22
#define PERF_BUILD_ID_H_ 1
33

4-
#include "session.h"
4+
#define BUILD_ID_SIZE 20
5+
6+
#include "tool.h"
7+
#include "types.h"
58

69
extern struct perf_tool build_id__mark_dso_hit_ops;
10+
struct dso;
711

812
int build_id__sprintf(const u8 *build_id, int len, char *bf);
913
char *dso__build_id_filename(struct dso *self, char *bf, size_t size);

‎tools/perf/util/event.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "../perf.h"
88
#include "map.h"
9+
#include "build-id.h"
910

1011
/*
1112
* PERF_SAMPLE_IP | PERF_SAMPLE_TID | *
@@ -96,8 +97,6 @@ struct perf_sample {
9697
struct stack_dump user_stack;
9798
};
9899

99-
#define BUILD_ID_SIZE 20
100-
101100
struct build_id_event {
102101
struct perf_event_header header;
103102
pid_t pid;

‎tools/perf/util/symbol.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <stdio.h>
1212
#include <byteswap.h>
1313
#include <libgen.h>
14+
#include "build-id.h"
1415

1516
#ifdef LIBELF_SUPPORT
1617
#include <libelf.h>
@@ -57,8 +58,6 @@ char *strxfrchar(char *s, char from, char to);
5758
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
5859
#endif
5960

60-
#define BUILD_ID_SIZE 20
61-
6261
/** struct symbol - symtab entry
6362
*
6463
* @ignore - resolvable but tools ignore it (e.g. idle routines)

0 commit comments

Comments
 (0)