Protect-header-files-with-a-consistent-style
PATCH 2/3 Protect-header-files-with-a-consistent-style
Quoted 1 line
From
94f8831a545f7137cccf6609e47381cf843c6e16Mon Sep 17 00:00:00 2001
From: John Kacur <[email protected]>
Date: Wed, 23 Sep 2009 21:17:57 +0200
Subject: [PATCH] Protect header files with a consistent style.
--- tools/perf/util/cache.h | 6 +++--- tools/perf/util/callchain.h | 2 +- tools/perf/util/color.h | 6 +++--- tools/perf/util/debug.h | 4 ++++ tools/perf/util/event.h | 3 ++- tools/perf/util/exec_cmd.h | 6 +++--- tools/perf/util/header.h | 6 +++--- tools/perf/util/help.h | 6 +++--- tools/perf/util/levenshtein.h | 6 +++--- tools/perf/util/module.h | 6 +++--- tools/perf/util/parse-events.h | 6 +++--- tools/perf/util/parse-options.h | 6 +++--- tools/perf/util/quote.h | 6 +++--- tools/perf/util/run-command.h | 6 +++--- tools/perf/util/sigchain.h | 6 +++--- tools/perf/util/strbuf.h | 6 +++--- tools/perf/util/string.h | 6 +++--- tools/perf/util/strlist.h | 6 +++--- tools/perf/util/svghelper.h | 6 +++--- tools/perf/util/symbol.h | 6 +++--- tools/perf/util/thread.h | 5 +++++ tools/perf/util/trace-event.h | 6 +++--- tools/perf/util/types.h | 6 +++--- tools/perf/util/values.h | 6 +++--- 24 files changed, 72 insertions(+), 62 deletions(-)
tools/perf/util/cache.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef CACHE_H -#define CACHE_H +#ifndef __PERF_CACHE_H +#define __PERF_CACHE_H#include "util.h" #include "strbuf.h"
@@ -117,4 +117,4 @@ extern char *perf_pathdup(const char *fmt, ...)extern size_t strlcpy (char *dest,const char *src,size_t size); -#endif /* CACHE_H */ +#endif /* __PERF_CACHE_H */
tools/perf/util/callchain.h +1 -1
@@ -58,4 +58,4 @@ static inline u64 cumul_hits(struct callchain_node *node)int register_callchain_param (struct callchain_param *param);void append_chain (struct callchain_node *root,struct ip_callchain *chain,struct symbol **syms); -#endif +#endif /* __PERF_CALLCHAIN_H */
tools/perf/util/color.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef COLOR_H -#define COLOR_H +#ifndef __PERF_COLOR_H +#define __PERF_COLOR_H/* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */ #define COLOR_MAXLEN 24
@@ -39,4 +39,4 @@ int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buint percent_color_fprintf (FILE *fp,const char *fmt,double percent);const char *get_percent_color (double percent); -#endif /* COLOR_H */ +#endif /* __PERF_COLOR_H */
tools/perf/util/debug.h +4 -0
@@ -1,4 +1,6 @@/* For debugging general purposes */ +#ifndef __PERF_DEBUG_H +#define __PERF_DEBUG_Hextern int verbose;extern int dump_trace;
@@ -6,3 +8,5 @@ extern int dump_trace;int eprintf (const char *fmt, ...) __attribute__((format (printf,1 ,2 )));int dump_printf (const char *fmt, ...) __attribute__((format (printf,1 ,2 )));void trace_event (event_t *event); + +#endif /* __PERF_DEBUG_H */
tools/perf/util/event.h +2 -1
@@ -1,5 +1,6 @@#ifndef __PERF_RECORD_H#define __PERF_RECORD_H +#include "../perf.h" #include "util.h" #include <linux/list.h>
@@ -101,4 +102,4 @@ struct map *map__clone(struct map *self);int map__overlap (struct map *l,struct map *r);size_t map__fprintf (struct map *self,FILE *fp); -#endif +#endif /* __PERF_RECORD_H */
tools/perf/util/exec_cmd.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef PERF_EXEC_CMD_H -#define PERF_EXEC_CMD_H +#ifndef __PERF_EXEC_CMD_H +#define __PERF_EXEC_CMD_Hextern void perf_set_argv_exec_path (const char *exec_path);extern const char *perf_extract_argv0_path (const char *path);
@@ -10,4 +10,4 @@ extern int execv_perf_cmd(const char **argv); /* NULL terminated */extern int execl_perf_cmd (const char *cmd, ...);extern const char *system_path (const char *path); -#endif /* PERF_EXEC_CMD_H */ +#endif /* __PERF_EXEC_CMD_H */
tools/perf/util/header.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_HEADER_H -#define _PERF_HEADER_H +#ifndef __PERF_HEADER_H +#define __PERF_HEADER_H#include "../../../include/linux/perf_event.h" #include <sys/types.h>
@@ -44,4 +44,4 @@ perf_header__find_attr(u64 id, struct perf_header *header);struct perf_header *perf_header__new (void ); -#endif /* _PERF_HEADER_H */ +#endif /* __PERF_HEADER_H */
tools/perf/util/help.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef HELP_H -#define HELP_H +#ifndef __PERF_HELP_H +#define __PERF_HELP_H struct cmdnames { size_t alloc;
@@ -26,4 +26,4 @@ int is_in_cmdlist(struct cmdnames *c, const char *s);void list_commands (const char *title,struct cmdnames *main_cmds,struct cmdnames *other_cmds); -#endif /* HELP_H */ +#endif /* __PERF_HELP_H */
tools/perf/util/levenshtein.h +3 -3
@@ -1,8 +1,8 @@ -#ifndef LEVENSHTEIN_H -#define LEVENSHTEIN_H +#ifndef __PERF_LEVENSHTEIN_H +#define __PERF_LEVENSHTEIN_Hint levenshtein (const char *string1,const char *string2,int swap_penalty,int substition_penalty,int insertion_penalty,int deletion_penalty); -#endif +#endif /* __PERF_LEVENSHTEIN_H */
tools/perf/util/module.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_MODULE_ -#define _PERF_MODULE_ 1 +#ifndef __PERF_MODULE_ +#define __PERF_MODULE_ 1#include <linux/types.h> #include "../types.h"
@@ -50,4 +50,4 @@ size_t mod_dso__fprintf(struct mod_dso *self, FILE *fp);struct module *mod_dso__find_module (struct mod_dso *self,const char *name);int mod_dso__load_modules (struct mod_dso *dso); -#endif /* _PERF_MODULE_ */ +#endif /* __PERF_MODULE_ */
tools/perf/util/parse-events.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PARSE_EVENTS_H -#define _PARSE_EVENTS_H +#ifndef __PERF_PARSE_EVENTS_H +#define __PERF_PARSE_EVENTS_H/* * Parse symbolic events/counts passed in as options: */
@@ -31,4 +31,4 @@ extern char debugfs_path[];extern int valid_debugfs_mount (const char *debugfs); -#endif /* _PARSE_EVENTS_H */ +#endif /* __PERF_PARSE_EVENTS_H */
tools/perf/util/parse-options.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef PARSE_OPTIONS_H -#define PARSE_OPTIONS_H +#ifndef __PERF_PARSE_OPTIONS_H +#define __PERF_PARSE_OPTIONS_H enum parse_opt_type {/* special types */
@@ -174,4 +174,4 @@ extern int parse_opt_verbosity_cb(const struct option *, const char *, int);extern const char *parse_options_fix_filename (const char *prefix,const char *file); -#endif +#endif /* __PERF_PARSE_OPTIONS_H */
tools/perf/util/quote.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef QUOTE_H -#define QUOTE_H +#ifndef __PERF_QUOTE_H +#define __PERF_QUOTE_H#include <stddef.h> #include <stdio.h>
@@ -65,4 +65,4 @@ extern void perl_quote_print(FILE *stream, const char *src);extern void python_quote_print (FILE *stream,const char *src);extern void tcl_quote_print (FILE *stream,const char *src); -#endif +#endif /* __PERF_QUOTE_H */
tools/perf/util/run-command.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef RUN_COMMAND_H -#define RUN_COMMAND_H +#ifndef __PERF_RUN_COMMAND_H +#define __PERF_RUN_COMMAND_Henum { ERR_RUN_COMMAND_FORK = 10000,
@@ -85,4 +85,4 @@ struct async {int start_async (struct async *async);int finish_async (struct async *async); -#endif +#endif /* __PERF_RUN_COMMAND_H */
tools/perf/util/sigchain.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef SIGCHAIN_H -#define SIGCHAIN_H +#ifndef __PERF_SIGCHAIN_H +#define __PERF_SIGCHAIN_Htypedef void (*sigchain_fun )(int );
@@ -8,4 +8,4 @@ int sigchain_pop(int sig);void sigchain_push_common (sigchain_fun f); -#endif /* SIGCHAIN_H */ +#endif /* __PERF_SIGCHAIN_H */
tools/perf/util/strbuf.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef STRBUF_H -#define STRBUF_H +#ifndef __PERF_STRBUF_H +#define __PERF_STRBUF_H/* * Strbuf's can be use in many ways: as a byte array, or to store arbitrary
@@ -134,4 +134,4 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *coextern int strbuf_branchname (struct strbuf *sb,const char *name);extern int strbuf_check_branch_ref (struct strbuf *sb,const char *name); -#endif /* STRBUF_H */ +#endif /* __PERF_STRBUF_H */
tools/perf/util/string.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_STRING_H_ -#define _PERF_STRING_H_ +#ifndef __PERF_STRING_H_ +#define __PERF_STRING_H_#include "types.h"
@@ -8,4 +8,4 @@ int hex2u64(const char *ptr, u64 *val);#define _STR (x) #x#define STR (x) _STR(x) -#endif +#endif /* __PERF_STRING_H */
tools/perf/util/strlist.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef STRLIST_H_ -#define STRLIST_H_ +#ifndef __PERF_STRLIST_H +#define __PERF_STRLIST_H#include <linux/rbtree.h> #include <stdbool.h>
@@ -36,4 +36,4 @@ static inline unsigned int strlist__nr_entries(const struct strlist *self) }int strlist__parse_list (struct strlist *self,const char *s); -#endif /* STRLIST_H_ */ +#endif /* __PERF_STRLIST_H */
tools/perf/util/svghelper.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _INCLUDE_GUARD_SVG_HELPER_ -#define _INCLUDE_GUARD_SVG_HELPER_ +#ifndef __PERF_SVGHELPER_H +#define __PERF_SVGHELPER_H#include "types.h"
@@ -25,4 +25,4 @@ extern void svg_close(void);extern int svg_page_width; -#endif +#endif /* __PERF_SVGHELPER_H */
tools/perf/util/symbol.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_SYMBOL_ -#define _PERF_SYMBOL_ 1 +#ifndef __PERF_SYMBOL +#define __PERF_SYMBOL 1#include <linux/types.h> #include "types.h"
@@ -89,4 +89,4 @@ extern struct dso *vdso;extern struct dso *hypervisor_dso;extern const char *vmlinux_name;extern int modules; -#endif /* _PERF_SYMBOL_ */ +#endif /* __PERF_SYMBOL */
tools/perf/util/thread.h +5 -0
@@ -1,3 +1,6 @@ +#ifndef __PERF_THREAD_H +#define __PERF_THREAD_H +#include <linux/rbtree.h> #include <linux/list.h> #include <unistd.h>
@@ -20,3 +23,5 @@ void thread__insert_map(struct thread *self, struct map *map);int thread__fork (struct thread *self,struct thread *parent);struct map *thread__find_map (struct thread *self,u64 ip);size_t threads__fprintf (FILE *fp,struct rb_root *threads); + +#endif /* __PERF_THREAD_H */
tools/perf/util/trace-event.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _TRACE_EVENTS_H -#define _TRACE_EVENTS_H +#ifndef __PERF_TRACE_EVENTS_H +#define __PERF_TRACE_EVENTS_H#include "parse-events.h"
@@ -242,4 +242,4 @@ void *raw_field_ptr(struct event *event, const char *name, void *data);void read_tracing_data (struct perf_event_attr *pattrs,int nb_events); -#endif /* _TRACE_EVENTS_H */ +#endif /* __PERF_TRACE_EVENTS_H */
tools/perf/util/types.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_TYPES_H -#define _PERF_TYPES_H +#ifndef __PERF_TYPES_H +#define __PERF_TYPES_H/* * We define u64 as unsigned long long for every architecture
@@ -14,4 +14,4 @@ typedef signed short s16;typedef unsigned char u8 ;typedef signed char s8 ; -#endif /* _PERF_TYPES_H */ +#endif /* __PERF_TYPES_H */
tools/perf/util/values.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_VALUES_H -#define _PERF_VALUES_H +#ifndef __PERF_VALUES_H +#define __PERF_VALUES_H#include "types.h"
@@ -24,4 +24,4 @@ void perf_read_values_add_value(struct perf_read_values *values,void perf_read_values_display (FILE *fp,struct perf_read_values *values,int raw); -#endif /* _PERF_VALUES_H */ +#endif /* __PERF_VALUES_H */
Signature · 1 line
1.6.0.6
Signed-off-by John Kacur <[email protected]>
[tip:perf/core] perf tools: Protect header files with a consistent style
In reply to John KacurCommit-ID: 8b40f521cf1c9750eab0c04da9075e7484675e9c Gitweb: http://git.kernel.org/tip/8b40f521cf1c9750eab0c04da9075e7484675e9c Author: John Kacur <[email protected]> AuthorDate: Thu, 24 Sep 2009 18:02:18 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 24 Sep 2009 21:27:51 +0200
perf tools: Protect header files with a consistent style
There was a colorful mix of header guards - standardize them.
Signed-off-by John Kacur <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- tools/perf/util/cache.h | 6 +++--- tools/perf/util/callchain.h | 2 +- tools/perf/util/color.h | 6 +++--- tools/perf/util/debug.h | 4 ++++ tools/perf/util/event.h | 3 ++- tools/perf/util/exec_cmd.h | 6 +++--- tools/perf/util/header.h | 6 +++--- tools/perf/util/help.h | 6 +++--- tools/perf/util/levenshtein.h | 6 +++--- tools/perf/util/module.h | 6 +++--- tools/perf/util/parse-events.h | 6 +++--- tools/perf/util/parse-options.h | 6 +++--- tools/perf/util/quote.h | 6 +++--- tools/perf/util/run-command.h | 6 +++--- tools/perf/util/sigchain.h | 6 +++--- tools/perf/util/strbuf.h | 6 +++--- tools/perf/util/string.h | 6 +++--- tools/perf/util/strlist.h | 6 +++--- tools/perf/util/svghelper.h | 6 +++--- tools/perf/util/symbol.h | 6 +++--- tools/perf/util/thread.h | 5 +++++ tools/perf/util/trace-event.h | 6 +++--- tools/perf/util/types.h | 6 +++--- tools/perf/util/values.h | 6 +++--- 24 files changed, 72 insertions(+), 62 deletions(-)
tools/perf/util/cache.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef CACHE_H -#define CACHE_H +#ifndef __PERF_CACHE_H +#define __PERF_CACHE_H#include "util.h" #include "strbuf.h"
@@ -117,4 +117,4 @@ extern char *perf_pathdup(const char *fmt, ...)extern size_t strlcpy (char *dest,const char *src,size_t size); -#endif /* CACHE_H */ +#endif /* __PERF_CACHE_H */
tools/perf/util/callchain.h +1 -1
@@ -58,4 +58,4 @@ static inline u64 cumul_hits(struct callchain_node *node)int register_callchain_param (struct callchain_param *param);void append_chain (struct callchain_node *root,struct ip_callchain *chain,struct symbol **syms); -#endif +#endif /* __PERF_CALLCHAIN_H */
tools/perf/util/color.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef COLOR_H -#define COLOR_H +#ifndef __PERF_COLOR_H +#define __PERF_COLOR_H/* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */ #define COLOR_MAXLEN 24
@@ -39,4 +39,4 @@ int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buint percent_color_fprintf (FILE *fp,const char *fmt,double percent);const char *get_percent_color (double percent); -#endif /* COLOR_H */ +#endif /* __PERF_COLOR_H */
tools/perf/util/debug.h +4 -0
@@ -1,4 +1,6 @@/* For debugging general purposes */ +#ifndef __PERF_DEBUG_H +#define __PERF_DEBUG_Hextern int verbose;extern int dump_trace;
@@ -6,3 +8,5 @@ extern int dump_trace;int eprintf (const char *fmt, ...) __attribute__((format (printf,1 ,2 )));int dump_printf (const char *fmt, ...) __attribute__((format (printf,1 ,2 )));void trace_event (event_t *event); + +#endif /* __PERF_DEBUG_H */
tools/perf/util/event.h +2 -1
@@ -1,5 +1,6 @@#ifndef __PERF_RECORD_H#define __PERF_RECORD_H +#include "../perf.h" #include "util.h" #include <linux/list.h>
@@ -101,4 +102,4 @@ struct map *map__clone(struct map *self);int map__overlap (struct map *l,struct map *r);size_t map__fprintf (struct map *self,FILE *fp); -#endif +#endif /* __PERF_RECORD_H */
tools/perf/util/exec_cmd.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef PERF_EXEC_CMD_H -#define PERF_EXEC_CMD_H +#ifndef __PERF_EXEC_CMD_H +#define __PERF_EXEC_CMD_Hextern void perf_set_argv_exec_path (const char *exec_path);extern const char *perf_extract_argv0_path (const char *path);
@@ -10,4 +10,4 @@ extern int execv_perf_cmd(const char **argv); /* NULL terminated */extern int execl_perf_cmd (const char *cmd, ...);extern const char *system_path (const char *path); -#endif /* PERF_EXEC_CMD_H */ +#endif /* __PERF_EXEC_CMD_H */
tools/perf/util/header.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_HEADER_H -#define _PERF_HEADER_H +#ifndef __PERF_HEADER_H +#define __PERF_HEADER_H#include "../../../include/linux/perf_event.h" #include <sys/types.h>
@@ -44,4 +44,4 @@ perf_header__find_attr(u64 id, struct perf_header *header);struct perf_header *perf_header__new (void ); -#endif /* _PERF_HEADER_H */ +#endif /* __PERF_HEADER_H */
tools/perf/util/help.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef HELP_H -#define HELP_H +#ifndef __PERF_HELP_H +#define __PERF_HELP_H struct cmdnames { size_t alloc;
@@ -26,4 +26,4 @@ int is_in_cmdlist(struct cmdnames *c, const char *s);void list_commands (const char *title,struct cmdnames *main_cmds,struct cmdnames *other_cmds); -#endif /* HELP_H */ +#endif /* __PERF_HELP_H */
tools/perf/util/levenshtein.h +3 -3
@@ -1,8 +1,8 @@ -#ifndef LEVENSHTEIN_H -#define LEVENSHTEIN_H +#ifndef __PERF_LEVENSHTEIN_H +#define __PERF_LEVENSHTEIN_Hint levenshtein (const char *string1,const char *string2,int swap_penalty,int substition_penalty,int insertion_penalty,int deletion_penalty); -#endif +#endif /* __PERF_LEVENSHTEIN_H */
tools/perf/util/module.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_MODULE_ -#define _PERF_MODULE_ 1 +#ifndef __PERF_MODULE_ +#define __PERF_MODULE_ 1#include <linux/types.h> #include "../types.h"
@@ -50,4 +50,4 @@ size_t mod_dso__fprintf(struct mod_dso *self, FILE *fp);struct module *mod_dso__find_module (struct mod_dso *self,const char *name);int mod_dso__load_modules (struct mod_dso *dso); -#endif /* _PERF_MODULE_ */ +#endif /* __PERF_MODULE_ */
tools/perf/util/parse-events.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PARSE_EVENTS_H -#define _PARSE_EVENTS_H +#ifndef __PERF_PARSE_EVENTS_H +#define __PERF_PARSE_EVENTS_H/* * Parse symbolic events/counts passed in as options: */
@@ -31,4 +31,4 @@ extern char debugfs_path[];extern int valid_debugfs_mount (const char *debugfs); -#endif /* _PARSE_EVENTS_H */ +#endif /* __PERF_PARSE_EVENTS_H */
tools/perf/util/parse-options.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef PARSE_OPTIONS_H -#define PARSE_OPTIONS_H +#ifndef __PERF_PARSE_OPTIONS_H +#define __PERF_PARSE_OPTIONS_H enum parse_opt_type {/* special types */
@@ -174,4 +174,4 @@ extern int parse_opt_verbosity_cb(const struct option *, const char *, int);extern const char *parse_options_fix_filename (const char *prefix,const char *file); -#endif +#endif /* __PERF_PARSE_OPTIONS_H */
tools/perf/util/quote.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef QUOTE_H -#define QUOTE_H +#ifndef __PERF_QUOTE_H +#define __PERF_QUOTE_H#include <stddef.h> #include <stdio.h>
@@ -65,4 +65,4 @@ extern void perl_quote_print(FILE *stream, const char *src);extern void python_quote_print (FILE *stream,const char *src);extern void tcl_quote_print (FILE *stream,const char *src); -#endif +#endif /* __PERF_QUOTE_H */
tools/perf/util/run-command.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef RUN_COMMAND_H -#define RUN_COMMAND_H +#ifndef __PERF_RUN_COMMAND_H +#define __PERF_RUN_COMMAND_Henum { ERR_RUN_COMMAND_FORK = 10000,
@@ -85,4 +85,4 @@ struct async {int start_async (struct async *async);int finish_async (struct async *async); -#endif +#endif /* __PERF_RUN_COMMAND_H */
tools/perf/util/sigchain.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef SIGCHAIN_H -#define SIGCHAIN_H +#ifndef __PERF_SIGCHAIN_H +#define __PERF_SIGCHAIN_Htypedef void (*sigchain_fun )(int );
@@ -8,4 +8,4 @@ int sigchain_pop(int sig);void sigchain_push_common (sigchain_fun f); -#endif /* SIGCHAIN_H */ +#endif /* __PERF_SIGCHAIN_H */
tools/perf/util/strbuf.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef STRBUF_H -#define STRBUF_H +#ifndef __PERF_STRBUF_H +#define __PERF_STRBUF_H/* * Strbuf's can be use in many ways: as a byte array, or to store arbitrary
@@ -134,4 +134,4 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *coextern int strbuf_branchname (struct strbuf *sb,const char *name);extern int strbuf_check_branch_ref (struct strbuf *sb,const char *name); -#endif /* STRBUF_H */ +#endif /* __PERF_STRBUF_H */
tools/perf/util/string.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_STRING_H_ -#define _PERF_STRING_H_ +#ifndef __PERF_STRING_H_ +#define __PERF_STRING_H_#include "types.h"
@@ -8,4 +8,4 @@ int hex2u64(const char *ptr, u64 *val);#define _STR (x) #x#define STR (x) _STR(x) -#endif +#endif /* __PERF_STRING_H */
tools/perf/util/strlist.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef STRLIST_H_ -#define STRLIST_H_ +#ifndef __PERF_STRLIST_H +#define __PERF_STRLIST_H#include <linux/rbtree.h> #include <stdbool.h>
@@ -36,4 +36,4 @@ static inline unsigned int strlist__nr_entries(const struct strlist *self) }int strlist__parse_list (struct strlist *self,const char *s); -#endif /* STRLIST_H_ */ +#endif /* __PERF_STRLIST_H */
tools/perf/util/svghelper.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _INCLUDE_GUARD_SVG_HELPER_ -#define _INCLUDE_GUARD_SVG_HELPER_ +#ifndef __PERF_SVGHELPER_H +#define __PERF_SVGHELPER_H#include "types.h"
@@ -25,4 +25,4 @@ extern void svg_close(void);extern int svg_page_width; -#endif +#endif /* __PERF_SVGHELPER_H */
tools/perf/util/symbol.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_SYMBOL_ -#define _PERF_SYMBOL_ 1 +#ifndef __PERF_SYMBOL +#define __PERF_SYMBOL 1#include <linux/types.h> #include "types.h"
@@ -89,4 +89,4 @@ extern struct dso *vdso;extern struct dso *hypervisor_dso;extern const char *vmlinux_name;extern int modules; -#endif /* _PERF_SYMBOL_ */ +#endif /* __PERF_SYMBOL */
tools/perf/util/thread.h +5 -0
@@ -1,3 +1,6 @@ +#ifndef __PERF_THREAD_H +#define __PERF_THREAD_H +#include <linux/rbtree.h> #include <linux/list.h> #include <unistd.h>
@@ -20,3 +23,5 @@ void thread__insert_map(struct thread *self, struct map *map);int thread__fork (struct thread *self,struct thread *parent);struct map *thread__find_map (struct thread *self,u64 ip);size_t threads__fprintf (FILE *fp,struct rb_root *threads); + +#endif /* __PERF_THREAD_H */
tools/perf/util/trace-event.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _TRACE_EVENTS_H -#define _TRACE_EVENTS_H +#ifndef __PERF_TRACE_EVENTS_H +#define __PERF_TRACE_EVENTS_H#include "parse-events.h"
@@ -242,4 +242,4 @@ void *raw_field_ptr(struct event *event, const char *name, void *data);void read_tracing_data (struct perf_event_attr *pattrs,int nb_events); -#endif /* _TRACE_EVENTS_H */ +#endif /* __PERF_TRACE_EVENTS_H */
tools/perf/util/types.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_TYPES_H -#define _PERF_TYPES_H +#ifndef __PERF_TYPES_H +#define __PERF_TYPES_H/* * We define u64 as unsigned long long for every architecture
@@ -14,4 +14,4 @@ typedef signed short s16;typedef unsigned char u8 ;typedef signed char s8 ; -#endif /* _PERF_TYPES_H */ +#endif /* __PERF_TYPES_H */
tools/perf/util/values.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _PERF_VALUES_H -#define _PERF_VALUES_H +#ifndef __PERF_VALUES_H +#define __PERF_VALUES_H#include "types.h"
@@ -24,4 +24,4 @@ void perf_read_values_add_value(struct perf_read_values *values,void perf_read_values_display (FILE *fp,struct perf_read_values *values,int raw); -#endif /* _PERF_VALUES_H */ +#endif /* __PERF_VALUES_H */