mirror of
https://github.com/andreas-abel/nanoBench.git
synced 2025-12-16 11:30:07 +01:00
support for huge pages
This commit is contained in:
@@ -45,6 +45,7 @@ void* runtime_rbp;
|
||||
void* runtime_rdi;
|
||||
void* runtime_rsi;
|
||||
void* runtime_rsp;
|
||||
void* huge_pages = NULL;
|
||||
int64_t pfc_mem[MAX_PROGRAMMABLE_COUNTERS];
|
||||
void* RSP_mem;
|
||||
|
||||
@@ -383,7 +384,11 @@ void create_runtime_code(char* measurement_template, long local_unroll_count, lo
|
||||
templateI += 8;
|
||||
rci += 8;
|
||||
} else if (starts_with_magic_bytes(&measurement_template[templateI], MAGIC_BYTES_RUNTIME_R14)) {
|
||||
*(void**)(&runtime_code[rci]) = runtime_r14 + RUNTIME_R_SIZE/2;
|
||||
if (huge_pages) {
|
||||
*(void**)(&runtime_code[rci]) = huge_pages;
|
||||
} else {
|
||||
*(void**)(&runtime_code[rci]) = runtime_r14 + RUNTIME_R_SIZE/2;
|
||||
}
|
||||
templateI += 8;
|
||||
rci += 8;
|
||||
} else if (starts_with_magic_bytes(&measurement_template[templateI], MAGIC_BYTES_RUNTIME_RBP)) {
|
||||
|
||||
@@ -158,6 +158,9 @@ extern void* runtime_rdi;
|
||||
extern void* runtime_rsi;
|
||||
extern void* runtime_rsp;
|
||||
|
||||
// If non-null, R14 will contain this address instead of runtime_r14.
|
||||
extern void* huge_pages;
|
||||
|
||||
// Stores performance counter values during measurements.
|
||||
extern int64_t pfc_mem[MAX_PROGRAMMABLE_COUNTERS];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user