-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathperformance_analysis.h
More file actions
33 lines (27 loc) · 858 Bytes
/
Copy pathperformance_analysis.h
File metadata and controls
33 lines (27 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// performance_analysis.h
#ifndef PERFORMANCE_ANALYSIS_H
#define PERFORMANCE_ANALYSIS_H
struct counter64 {
unsigned int lo;
unsigned int hi;
};
struct perf_counters {
struct counter64 mcycle;
struct counter64 minstret;
struct counter64 mhpmcounter3;
struct counter64 mhpmcounter4;
struct counter64 mhpmcounter5;
struct counter64 mhpmcounter6;
struct counter64 mhpmcounter7;
struct counter64 mhpmcounter8;
struct counter64 mhpmcounter9;
};
// Global counters
extern struct perf_counters before, after, delta;
// Function declarations
void clear_counters(void);
void read_counters(struct perf_counters *c);
void before_perf(void);
void present_data(const char* filter_name);
void test_filter_performance(const char* filter_name, void (*filter_func)(const unsigned char[][320], volatile unsigned char*));
#endif