aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/sort.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/sort.h')
-rw-r--r--tools/perf/util/sort.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 5e34676a98e8..3d7cef73924c 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -1,29 +1,18 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __PERF_SORT_H 2#ifndef __PERF_SORT_H
3#define __PERF_SORT_H 3#define __PERF_SORT_H
4#include "../builtin.h"
5
6#include <regex.h> 4#include <regex.h>
7 5#include <stdbool.h>
8#include "color.h"
9#include <linux/list.h> 6#include <linux/list.h>
10#include "cache.h"
11#include <linux/rbtree.h> 7#include <linux/rbtree.h>
12#include "map_symbol.h" 8#include "map_symbol.h"
13#include "symbol_conf.h" 9#include "symbol_conf.h"
14#include "string.h"
15#include "callchain.h" 10#include "callchain.h"
16#include "values.h" 11#include "values.h"
17 12
18#include "../perf.h"
19#include "debug.h"
20#include "header.h"
21
22#include <subcmd/parse-options.h>
23#include "parse-events.h"
24#include "hist.h" 13#include "hist.h"
25#include "srcline.h"
26 14
15struct option;
27struct thread; 16struct thread;
28 17
29extern regex_t parent_regex; 18extern regex_t parent_regex;
@@ -204,18 +193,6 @@ static inline float hist_entry__get_percent_limit(struct hist_entry *he)
204 return period * 100.0 / total_period; 193 return period * 100.0 / total_period;
205} 194}
206 195
207static inline u64 cl_address(u64 address)
208{
209 /* return the cacheline of the address */
210 return (address & ~(cacheline_size() - 1));
211}
212
213static inline u64 cl_offset(u64 address)
214{
215 /* return the cacheline of the address */
216 return (address & (cacheline_size() - 1));
217}
218
219enum sort_mode { 196enum sort_mode {
220 SORT_MODE__NORMAL, 197 SORT_MODE__NORMAL,
221 SORT_MODE__BRANCH, 198 SORT_MODE__BRANCH,