This repository was archived by the owner on Jan 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathEPTScan.h
More file actions
61 lines (48 loc) · 1.62 KB
/
EPTScan.h
File metadata and controls
61 lines (48 loc) · 1.62 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* SPDX-License-Identifier: GPL-2.0
*
* Copyright (c) 2018 Intel Corporation
*
* Authors: Fengguang Wu <fengguang.wu@intel.com>
*/
#ifndef AEP_EPT_SCAN_H
#define AEP_EPT_SCAN_H
#include <string>
#include "ProcIdlePages.h"
#include "Numa.h"
#include "AddrSequence.h"
#include "MovePages.h"
class EPTScan: public ProcIdlePages
{
public:
void prepare_walks(int max_walks);
int walk_multi(int nr, float interval);
void gather_walk_stats(unsigned long& young_bytes,
unsigned long& pmem_young_bytes,
unsigned long& top_bytes,
unsigned long& all_bytes);
static void reset_sys_refs_count(int nr_walks);
void count_refs();
static int save_counts(std::string filename);
void set_numacollection(NumaNodeCollection* new_numa_collection) {
numa_collection = new_numa_collection;
}
int get_memory_type();
int get_memory_type_range(void** addrs, unsigned long count,
AddrSequence& addrobj);
static unsigned long get_total_memory_page_count(ProcIdlePageType tpye,
ref_location location);
static histogram_2d_type& get_sys_refs_count(ProcIdlePageType type) {
return sys_refs_count[type];
}
private:
bool should_stop();
void count_refs_one(ProcIdleRefs& prc);
static void reset_one_ref_count(histogram_2d_type& ref_count_obj, int node_size);
private:
static histogram_2d_type sys_refs_count[MAX_ACCESSED + 1];
protected:
NumaNodeCollection* numa_collection = NULL;
};
#endif
// vim:set ts=2 sw=2 et: