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>
This commit is contained in:
		
					parent
					
						
							
								ebb296c276
							
						
					
				
			
			
				commit
				
					
						4383db88a7
					
				
			
		
					 5 changed files with 9 additions and 5 deletions
				
			
		| 
						 | 
					@ -14,6 +14,7 @@
 | 
				
			||||||
#include "util/parse-options.h"
 | 
					#include "util/parse-options.h"
 | 
				
			||||||
#include "util/strlist.h"
 | 
					#include "util/strlist.h"
 | 
				
			||||||
#include "util/build-id.h"
 | 
					#include "util/build-id.h"
 | 
				
			||||||
 | 
					#include "util/symbol.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int build_id_cache__add_file(const char *filename, const char *debugdir)
 | 
					static int build_id_cache__add_file(const char *filename, const char *debugdir)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,7 @@
 | 
				
			||||||
#include "debug.h"
 | 
					#include "debug.h"
 | 
				
			||||||
#include "annotate.h"
 | 
					#include "annotate.h"
 | 
				
			||||||
#include <pthread.h>
 | 
					#include <pthread.h>
 | 
				
			||||||
 | 
					#include <linux/bitops.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const char 	*disassembler_style;
 | 
					const char 	*disassembler_style;
 | 
				
			||||||
const char	*objdump_path;
 | 
					const char	*objdump_path;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,13 @@
 | 
				
			||||||
#ifndef PERF_BUILD_ID_H_
 | 
					#ifndef PERF_BUILD_ID_H_
 | 
				
			||||||
#define PERF_BUILD_ID_H_ 1
 | 
					#define PERF_BUILD_ID_H_ 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "session.h"
 | 
					#define BUILD_ID_SIZE 20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "tool.h"
 | 
				
			||||||
 | 
					#include "types.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern struct perf_tool build_id__mark_dso_hit_ops;
 | 
					extern struct perf_tool build_id__mark_dso_hit_ops;
 | 
				
			||||||
 | 
					struct dso;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int build_id__sprintf(const u8 *build_id, int len, char *bf);
 | 
					int build_id__sprintf(const u8 *build_id, int len, char *bf);
 | 
				
			||||||
char *dso__build_id_filename(struct dso *self, char *bf, size_t size);
 | 
					char *dso__build_id_filename(struct dso *self, char *bf, size_t size);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../perf.h"
 | 
					#include "../perf.h"
 | 
				
			||||||
#include "map.h"
 | 
					#include "map.h"
 | 
				
			||||||
 | 
					#include "build-id.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * PERF_SAMPLE_IP | PERF_SAMPLE_TID | *
 | 
					 * PERF_SAMPLE_IP | PERF_SAMPLE_TID | *
 | 
				
			||||||
| 
						 | 
					@ -96,8 +97,6 @@ struct perf_sample {
 | 
				
			||||||
	struct stack_dump user_stack;
 | 
						struct stack_dump user_stack;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define BUILD_ID_SIZE 20
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct build_id_event {
 | 
					struct build_id_event {
 | 
				
			||||||
	struct perf_event_header header;
 | 
						struct perf_event_header header;
 | 
				
			||||||
	pid_t			 pid;
 | 
						pid_t			 pid;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <byteswap.h>
 | 
					#include <byteswap.h>
 | 
				
			||||||
#include <libgen.h>
 | 
					#include <libgen.h>
 | 
				
			||||||
 | 
					#include "build-id.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef LIBELF_SUPPORT
 | 
					#ifdef LIBELF_SUPPORT
 | 
				
			||||||
#include <libelf.h>
 | 
					#include <libelf.h>
 | 
				
			||||||
| 
						 | 
					@ -57,8 +58,6 @@ char *strxfrchar(char *s, char from, char to);
 | 
				
			||||||
#define DMGL_ANSI        (1 << 1)       /* Include const, volatile, etc */
 | 
					#define DMGL_ANSI        (1 << 1)       /* Include const, volatile, etc */
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define BUILD_ID_SIZE 20
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/** struct symbol - symtab entry
 | 
					/** struct symbol - symtab entry
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @ignore - resolvable but tools ignore it (e.g. idle routines)
 | 
					 * @ignore - resolvable but tools ignore it (e.g. idle routines)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue