diff options
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 66cb31fe81d2..8b091a51e4a2 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <pthread.h> | 5 | #include <pthread.h> |
6 | #include "callchain.h" | 6 | #include "callchain.h" |
7 | #include "header.h" | ||
7 | 8 | ||
8 | extern struct callchain_param callchain_param; | 9 | extern struct callchain_param callchain_param; |
9 | 10 | ||
@@ -114,6 +115,9 @@ bool hists__new_col_len(struct hists *self, enum hist_column col, u16 len); | |||
114 | void hists__reset_col_len(struct hists *hists); | 115 | void hists__reset_col_len(struct hists *hists); |
115 | void hists__calc_col_len(struct hists *hists, struct hist_entry *he); | 116 | void hists__calc_col_len(struct hists *hists, struct hist_entry *he); |
116 | 117 | ||
118 | void hists__match(struct hists *leader, struct hists *other); | ||
119 | int hists__link(struct hists *leader, struct hists *other); | ||
120 | |||
117 | struct perf_hpp { | 121 | struct perf_hpp { |
118 | char *buf; | 122 | char *buf; |
119 | size_t size; | 123 | size_t size; |
@@ -140,8 +144,12 @@ enum { | |||
140 | PERF_HPP__OVERHEAD_GUEST_US, | 144 | PERF_HPP__OVERHEAD_GUEST_US, |
141 | PERF_HPP__SAMPLES, | 145 | PERF_HPP__SAMPLES, |
142 | PERF_HPP__PERIOD, | 146 | PERF_HPP__PERIOD, |
147 | PERF_HPP__PERIOD_BASELINE, | ||
143 | PERF_HPP__DELTA, | 148 | PERF_HPP__DELTA, |
149 | PERF_HPP__RATIO, | ||
150 | PERF_HPP__WEIGHTED_DIFF, | ||
144 | PERF_HPP__DISPL, | 151 | PERF_HPP__DISPL, |
152 | PERF_HPP__FORMULA, | ||
145 | 153 | ||
146 | PERF_HPP__MAX_INDEX | 154 | PERF_HPP__MAX_INDEX |
147 | }; | 155 | }; |
@@ -153,21 +161,27 @@ int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he, | |||
153 | 161 | ||
154 | struct perf_evlist; | 162 | struct perf_evlist; |
155 | 163 | ||
164 | struct hist_browser_timer { | ||
165 | void (*timer)(void *arg); | ||
166 | void *arg; | ||
167 | int refresh; | ||
168 | }; | ||
169 | |||
156 | #ifdef NEWT_SUPPORT | 170 | #ifdef NEWT_SUPPORT |
157 | #include "../ui/keysyms.h" | 171 | #include "../ui/keysyms.h" |
158 | int hist_entry__tui_annotate(struct hist_entry *he, int evidx, | 172 | int hist_entry__tui_annotate(struct hist_entry *he, int evidx, |
159 | void(*timer)(void *arg), void *arg, int delay_secs); | 173 | struct hist_browser_timer *hbt); |
160 | 174 | ||
161 | int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, | 175 | int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, |
162 | void(*timer)(void *arg), void *arg, | 176 | struct hist_browser_timer *hbt, |
163 | int refresh); | 177 | struct perf_session_env *env); |
178 | int script_browse(const char *script_opt); | ||
164 | #else | 179 | #else |
165 | static inline | 180 | static inline |
166 | int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused, | 181 | int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused, |
167 | const char *help __maybe_unused, | 182 | const char *help __maybe_unused, |
168 | void(*timer)(void *arg) __maybe_unused, | 183 | struct hist_browser_timer *hbt __maybe_unused, |
169 | void *arg __maybe_unused, | 184 | struct perf_session_env *env __maybe_unused) |
170 | int refresh __maybe_unused) | ||
171 | { | 185 | { |
172 | return 0; | 186 | return 0; |
173 | } | 187 | } |
@@ -175,28 +189,29 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused, | |||
175 | static inline int hist_entry__tui_annotate(struct hist_entry *self | 189 | static inline int hist_entry__tui_annotate(struct hist_entry *self |
176 | __maybe_unused, | 190 | __maybe_unused, |
177 | int evidx __maybe_unused, | 191 | int evidx __maybe_unused, |
178 | void(*timer)(void *arg) | 192 | struct hist_browser_timer *hbt |
179 | __maybe_unused, | 193 | __maybe_unused) |
180 | void *arg __maybe_unused, | ||
181 | int delay_secs __maybe_unused) | ||
182 | { | 194 | { |
183 | return 0; | 195 | return 0; |
184 | } | 196 | } |
197 | |||
198 | static inline int script_browse(const char *script_opt __maybe_unused) | ||
199 | { | ||
200 | return 0; | ||
201 | } | ||
202 | |||
185 | #define K_LEFT -1 | 203 | #define K_LEFT -1 |
186 | #define K_RIGHT -2 | 204 | #define K_RIGHT -2 |
187 | #endif | 205 | #endif |
188 | 206 | ||
189 | #ifdef GTK2_SUPPORT | 207 | #ifdef GTK2_SUPPORT |
190 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help, | 208 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help, |
191 | void(*timer)(void *arg), void *arg, | 209 | struct hist_browser_timer *hbt __maybe_unused); |
192 | int refresh); | ||
193 | #else | 210 | #else |
194 | static inline | 211 | static inline |
195 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused, | 212 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused, |
196 | const char *help __maybe_unused, | 213 | const char *help __maybe_unused, |
197 | void(*timer)(void *arg) __maybe_unused, | 214 | struct hist_browser_timer *hbt __maybe_unused) |
198 | void *arg __maybe_unused, | ||
199 | int refresh __maybe_unused) | ||
200 | { | 215 | { |
201 | return 0; | 216 | return 0; |
202 | } | 217 | } |
@@ -204,4 +219,8 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused, | |||
204 | 219 | ||
205 | unsigned int hists__sort_list_width(struct hists *self); | 220 | unsigned int hists__sort_list_width(struct hists *self); |
206 | 221 | ||
222 | double perf_diff__compute_delta(struct hist_entry *he); | ||
223 | double perf_diff__compute_ratio(struct hist_entry *he); | ||
224 | s64 perf_diff__compute_wdiff(struct hist_entry *he); | ||
225 | int perf_diff__formula(char *buf, size_t size, struct hist_entry *he); | ||
207 | #endif /* __PERF_HIST_H */ | 226 | #endif /* __PERF_HIST_H */ |