ChampSim
cvp2champsim.cc File Reference
#include <algorithm>
#include <assert.h>
#include <cstdint>
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../inc/trace_instruction.h"
Include dependency graph for cvp2champsim.cc:

Classes

struct  trace
 

Macros

#define XZ_PATH   "/usr/bin/xz"
 
#define GZIP_PATH   "/bin/gzip"
 
#define CAT_PATH   "/bin/cat"
 
#define UINT64   unsigned long long int
 

Typedefs

using trace_instr_format = input_instr
 

Enumerations

enum  InstClass {
  aluInstClass = 0 , loadInstClass = 1 , storeInstClass = 2 , condBranchInstClass = 3 ,
  uncondDirectBranchInstClass = 4 , uncondIndirectBranchInstClass = 5 , fpInstClass = 6 , slowAluInstClass = 7 ,
  undefInstClass = 8
}
 
enum  OpType {
  OPTYPE_OP = 2 , OPTYPE_RET_UNCOND , OPTYPE_JMP_DIRECT_UNCOND , OPTYPE_JMP_INDIRECT_UNCOND ,
  OPTYPE_CALL_DIRECT_UNCOND , OPTYPE_CALL_INDIRECT_UNCOND , OPTYPE_RET_COND , OPTYPE_JMP_DIRECT_COND ,
  OPTYPE_JMP_INDIRECT_COND , OPTYPE_CALL_DIRECT_COND , OPTYPE_CALL_INDIRECT_COND , OPTYPE_ERROR ,
  OPTYPE_MAX
}
 

Functions

bool is_branch (InstClass t)
 
auto open_trace_file (void)
 
void preprocess_file (void)
 
UINT64 transform (UINT64 a)
 
int main (int argc, char **argv)
 

Variables

bool verbose = false
 
const char * branch_names []
 
long long int counts [OPTYPE_MAX]
 
std::map< UINT64, bool > code_pages
 
std::map< UINT64, bool > data_pages
 
std::map< UINT64, UINT64remapped_pages
 
UINT64 bump_page = 0x1000
 
char tracefilename [1000]
 

Macro Definition Documentation

◆ CAT_PATH

#define CAT_PATH   "/bin/cat"

◆ GZIP_PATH

#define GZIP_PATH   "/bin/gzip"

◆ UINT64

#define UINT64   unsigned long long int

◆ XZ_PATH

#define XZ_PATH   "/usr/bin/xz"

Typedef Documentation

◆ trace_instr_format

Enumeration Type Documentation

◆ InstClass

enum InstClass
Enumerator
aluInstClass 
loadInstClass 
storeInstClass 
condBranchInstClass 
uncondDirectBranchInstClass 
uncondIndirectBranchInstClass 
fpInstClass 
slowAluInstClass 
undefInstClass 

◆ OpType

enum OpType
Enumerator
OPTYPE_OP 
OPTYPE_RET_UNCOND 
OPTYPE_JMP_DIRECT_UNCOND 
OPTYPE_JMP_INDIRECT_UNCOND 
OPTYPE_CALL_DIRECT_UNCOND 
OPTYPE_CALL_INDIRECT_UNCOND 
OPTYPE_RET_COND 
OPTYPE_JMP_DIRECT_COND 
OPTYPE_JMP_INDIRECT_COND 
OPTYPE_CALL_DIRECT_COND 
OPTYPE_CALL_INDIRECT_COND 
OPTYPE_ERROR 
OPTYPE_MAX 

Function Documentation

◆ is_branch()

bool is_branch ( InstClass  t)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ open_trace_file()

auto open_trace_file ( void  )

◆ preprocess_file()

void preprocess_file ( void  )

◆ transform()

UINT64 transform ( UINT64  a)

Variable Documentation

◆ branch_names

const char* branch_names[]
Initial value:
= {
"none",
"none",
"OPTYPE_OP",
"OPTYPE_RET_UNCOND",
"OPTYPE_JMP_DIRECT_UNCOND",
"OPTYPE_JMP_INDIRECT_UNCOND",
"OPTYPE_CALL_DIRECT_UNCOND",
"OPTYPE_CALL_INDIRECT_UNCOND",
"OPTYPE_RET_COND",
"OPTYPE_JMP_DIRECT_COND",
"OPTYPE_JMP_INDIRECT_COND",
"OPTYPE_CALL_DIRECT_COND",
"OPTYPE_CALL_INDIRECT_COND",
"OPTYPE_ERROR",
"OPTYPE_MAX",
}

◆ bump_page

UINT64 bump_page = 0x1000

◆ code_pages

std::map<UINT64, bool> code_pages

◆ counts

long long int counts[OPTYPE_MAX]

◆ data_pages

std::map<UINT64, bool> data_pages

◆ remapped_pages

std::map<UINT64, UINT64> remapped_pages

◆ tracefilename

char tracefilename[1000]

◆ verbose

bool verbose = false