aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:20:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:20:11 -0400
commitade0899b298ba2c43bfd6abd8cbc2545944cde0c (patch)
treea448dfb440b3b958b6306bb43620cd5d76f504bf /tools/perf/util/cache.h
parent871a0596cb2f51b57dc583d1a7c4be0186582fe7 (diff)
parent95cf59ea72331d0093010543b8951bb43f262cac (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar: "This tree includes some late late perf items that missed the first round: tools: - Bash auto completion improvements, now we can auto complete the tools long options, tracepoint event names, etc, from Namhyung Kim. - Look up thread using tid instead of pid in 'perf sched'. - Move global variables into a perf_kvm struct, from David Ahern. - Hists refactorings, preparatory for improved 'diff' command, from Jiri Olsa. - Hists refactorings, preparatory for event group viewieng work, from Namhyung Kim. - Remove double negation on optional feature macro definitions, from Namhyung Kim. - Remove several cases of needless global variables, on most builtins. - misc fixes kernel: - sysfs support for IBS on AMD CPUs, from Robert Richter. - Support for an upcoming Intel CPU, the Xeon-Phi / Knights Corner HPC blade PMU, from Vince Weaver. - misc fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) perf: Fix perf_cgroup_switch for sw-events perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu perf/AMD/IBS: Add sysfs support perf hists: Add more helpers for hist entry stat perf hists: Move he->stat.nr_events initialization to a template perf hists: Introduce struct he_stat perf diff: Removing the total_period argument from output code perf tool: Add hpp interface to enable/disable hpp column perf tools: Removing hists pair argument from output path perf hists: Separate overhead and baseline columns perf diff: Refactor diff displacement possition info perf hists: Add struct hists pointer to struct hist_entry perf tools: Complete tracepoint event names perf/x86: Add support for Intel Xeon-Phi Knights Corner PMU perf evlist: Remove some unused methods perf evlist: Introduce add_newtp method perf kvm: Move global variables into a perf_kvm struct perf tools: Convert to BACKTRACE_SUPPORT perf tools: Long option completion support for each subcommands perf tools: Complete long option names of perf command ...
Diffstat (limited to 'tools/perf/util/cache.h')
-rw-r--r--tools/perf/util/cache.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index ab1769426541..2bd51370ad28 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -33,39 +33,41 @@ extern int pager_use_color;
33 33
34extern int use_browser; 34extern int use_browser;
35 35
36#if defined(NO_NEWT_SUPPORT) && defined(NO_GTK2_SUPPORT) 36#if defined(NEWT_SUPPORT) || defined(GTK2_SUPPORT)
37static inline void setup_browser(bool fallback_to_pager)
38{
39 if (fallback_to_pager)
40 setup_pager();
41}
42static inline void exit_browser(bool wait_for_ok __maybe_unused) {}
43#else
44void setup_browser(bool fallback_to_pager); 37void setup_browser(bool fallback_to_pager);
45void exit_browser(bool wait_for_ok); 38void exit_browser(bool wait_for_ok);
46 39
47#ifdef NO_NEWT_SUPPORT 40#ifdef NEWT_SUPPORT
41int ui__init(void);
42void ui__exit(bool wait_for_ok);
43#else
48static inline int ui__init(void) 44static inline int ui__init(void)
49{ 45{
50 return -1; 46 return -1;
51} 47}
52static inline void ui__exit(bool wait_for_ok __maybe_unused) {} 48static inline void ui__exit(bool wait_for_ok __maybe_unused) {}
53#else
54int ui__init(void);
55void ui__exit(bool wait_for_ok);
56#endif 49#endif
57 50
58#ifdef NO_GTK2_SUPPORT 51#ifdef GTK2_SUPPORT
52int perf_gtk__init(void);
53void perf_gtk__exit(bool wait_for_ok);
54#else
59static inline int perf_gtk__init(void) 55static inline int perf_gtk__init(void)
60{ 56{
61 return -1; 57 return -1;
62} 58}
63static inline void perf_gtk__exit(bool wait_for_ok __maybe_unused) {} 59static inline void perf_gtk__exit(bool wait_for_ok __maybe_unused) {}
64#else
65int perf_gtk__init(void);
66void perf_gtk__exit(bool wait_for_ok);
67#endif 60#endif
68#endif /* NO_NEWT_SUPPORT && NO_GTK2_SUPPORT */ 61
62#else /* NEWT_SUPPORT || GTK2_SUPPORT */
63
64static inline void setup_browser(bool fallback_to_pager)
65{
66 if (fallback_to_pager)
67 setup_pager();
68}
69static inline void exit_browser(bool wait_for_ok __maybe_unused) {}
70#endif /* NEWT_SUPPORT || GTK2_SUPPORT */
69 71
70char *alias_lookup(const char *alias); 72char *alias_lookup(const char *alias);
71int split_cmdline(char *cmdline, const char ***argv); 73int split_cmdline(char *cmdline, const char ***argv);
@@ -105,7 +107,7 @@ extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2
105extern char *perf_pathdup(const char *fmt, ...) 107extern char *perf_pathdup(const char *fmt, ...)
106 __attribute__((format (printf, 1, 2))); 108 __attribute__((format (printf, 1, 2)));
107 109
108#ifdef NO_STRLCPY 110#ifndef HAVE_STRLCPY
109extern size_t strlcpy(char *dest, const char *src, size_t size); 111extern size_t strlcpy(char *dest, const char *src, size_t size);
110#endif 112#endif
111 113