Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cmp_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include "decoupled_frontend.h"

Flag perf_pred_started = FALSE;
Cmp_Model cmp_model;

/**************************************************************************************/
/* Static prototypes */
Expand Down
2 changes: 1 addition & 1 deletion src/cmp_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ typedef struct Cmp_Model_struct {
/**************************************************************************************/
/* Global vars */

Cmp_Model cmp_model;
// Cmp_Model cmp_model;
extern Cmp_Model cmp_model;

/**************************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/debug/memview.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct Proc_Info_struct {

FILE* trace;
Bank_Info* bank_infos;
Proc_Info* proc_infos;
static Proc_Info* proc_infos;
Trigger* start_trigger;
Mem_Req_Type* req_types;

Expand Down
2 changes: 1 addition & 1 deletion src/dumb_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "debug/debug.param.h"
#include "general.param.h"
#include "memory/memory.param.h"

Dumb_Model dumb_model;

/**************************************************************************************/
/* Types */
Expand Down
2 changes: 1 addition & 1 deletion src/dumb_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef struct Dumb_Model_struct {
/**************************************************************************************/
/* Global vars */

Dumb_Model dumb_model;
// Dumb_Model dumb_model;
extern Dumb_Model dumb_model;

/**************************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/dvfs/perf_pred.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ enum {
static Counter chip_cycle_count;
static Stat_Mon* stat_mon;

Proc_Info* proc_infos;
static Proc_Info* proc_infos;

/* static function prototypes */
static void critical_access_plot(uns proc_id, Mem_Req_Type type, uns req_ret,
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/frontend_table.def
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Format: enum name, text name, function name prefix
FRONTEND_IMPL(PIN_EXEC_DRIVEN, "pin_exec_driven", pin_exec_driven)
FRONTEND_IMPL(TRACE, "trace", trace)
#ifdef ENABLE_PT_MEMTRACE
// #ifdef ENABLE_PT_MEMTRACE
FRONTEND_IMPL(MEMTRACE, "memtrace", ext_trace)
FRONTEND_IMPL(PT, "pt", ext_trace)
#endif
// #endif
2 changes: 1 addition & 1 deletion src/frontend/pin_trace_fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/**************************************************************************************/
/* Global Variables */

char* trace_files[MAX_NUM_PROCS];
static char* trace_files[MAX_NUM_PROCS];

ctype_pin_inst* next_pi;

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/pt_memtrace/memtrace_fe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
/**************************************************************************************/
/* Global Variables */

char* trace_files[MAX_NUM_PROCS];
static char* trace_files[MAX_NUM_PROCS];
TraceReader* trace_readers[MAX_NUM_PROCS];
//TODO: Make per proc?
uint64_t ins_id = 0;
Expand Down
6 changes: 5 additions & 1 deletion src/frontend/pt_memtrace/trace_fe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <map>
#include <fstream>
#include <iomanip>
#include <limits>

#include "frontend/pt_memtrace/pt_fe.h"
#include "frontend/frontend_intf.h"
Expand Down Expand Up @@ -167,8 +168,9 @@ void ext_trace_fetch_op(uns proc_id, Op* op) {
if (!off_path_mode[proc_id]) {

int success = false;
if (FRONTEND == FE_PT)
if (FRONTEND == FE_PT) {
success = pt_trace_read(proc_id, &next_onpath_pi[proc_id]);
}
else if (FRONTEND == FE_MEMTRACE)
success = memtrace_trace_read(proc_id, &next_onpath_pi[proc_id]);
if(!success) {
Expand Down Expand Up @@ -258,12 +260,14 @@ void ext_trace_init() {
memset(next_onpath_pi, 0, sizeof(next_onpath_pi));

if (FRONTEND == FE_PT) {
printf("[ext_trace_init] Initializing pt frontend\n");
pt_init();
for(uns proc_id = 0; proc_id < NUM_CORES; proc_id++) {
pt_trace_read(proc_id, &next_onpath_pi[proc_id]);
}
}
else if (FRONTEND == FE_MEMTRACE) {
printf("[ext_trace_init] Initializing memtrace frontend\n");
memtrace_init();
for(uns proc_id = 0; proc_id < NUM_CORES; proc_id++) {
memtrace_trace_read(proc_id, &next_onpath_pi[proc_id]);
Expand Down
2 changes: 1 addition & 1 deletion src/memory/cache_part.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ typedef void (*Search_Func)(void);
/**************************************************************************************/
/* Global variables */

Proc_Info* proc_infos;
static Proc_Info* proc_infos;
Trigger* l1_part_start; // indicates the L1 partition has been enabled
Trigger* l1_part_trigger; // external trigger for trigger repart (should not be
// set too often)
Expand Down
2 changes: 1 addition & 1 deletion src/pin/pin_lib/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ctype_pin_inst* pin_decoder_get_latest_inst() {
}

void pin_decoder_print_unknown_opcodes() {
for(const auto opcode : unknown_opcodes) {
for(const auto &opcode : unknown_opcodes) {
(*glb_err_ostream) << opcode << std::endl;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pin/pin_lib/uop_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ typedef struct Trace_Uop_struct Trace_Uop;
extern int op_type_delays[NUM_OP_TYPES];
extern uns NEW_INST_TABLE_SIZE; // TODO: what is this?

char* trace_files[MAX_NUM_PROCS];
// static char* trace_files[MAX_NUM_PROCS];

char dbg_print_buf[1024];

Expand Down
2 changes: 1 addition & 1 deletion src/pin/pin_lib/x86_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ void init_pin_opcode_convert(void) {
iclass_to_scarab_map[XED_ICLASS_SYSCALL] = {OP_IADD, -1, 1, NONE};
iclass_to_scarab_map[XED_ICLASS_SYSENTER] = {OP_IADD, -1, 1, NONE};
iclass_to_scarab_map[XED_ICLASS_SYSRET] = {OP_IADD, -1, 1, NONE};
iclass_to_scarab_map[XED_ICLASS_SYSRET64] = {OP_IADD, -1, 1, NONE};
// iclass_to_scarab_map[XED_ICLASS_SYSRET64] = {OP_IADD, -1, 1, NONE};

iclass_to_scarab_map[XED_ICLASS_SWAPGS] = {OP_MOV,-1,1,NONE};
iclass_to_scarab_map[XED_ICLASS_TEST] = {OP_LOGIC, -1, 1, NONE};
Expand Down
2 changes: 1 addition & 1 deletion src/prefetcher/l2l1pref.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

extern Memory* mem;
extern Dcache_Stage* dc;
Cache* l1_cache;
static Cache* l1_cache;

/***************************************************************************************/
/* Local Prototypes */
Expand Down
2 changes: 1 addition & 1 deletion src/prefetcher/l2way_pref.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ L2way_Rec** l2way_table;
L1pref_Req* l1pref_req_queue;
static Counter l1pref_send_no;
static Counter l1pref_req_no;
Cache* l1_cache;
static Cache* l1_cache;

/**************************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion src/uop_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static inline Flag in_uop_cache_search(Addr search_addr, Flag update_repl, Flag
/**************************************************************************************/
/* Global Variables */

uns8 proc_id;
static uns8 proc_id;
static Flag UOP_CACHE_ON;

// uop trace/bbl accumulation
Expand Down