|
CCTLib
Calling-context and data-object attribution library for Intel Pin
|
#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <iostream>#include <unistd.h>#include <assert.h>#include <string>#include <math.h>#include <sstream>#include <locale>#include <unordered_map>#include "pin.H"#include "cctlib.H"
Include dependency graph for cct_data_name.cpp:Go to the source code of this file.
Classes | |
| struct | DataObj |
Macros | |
| #define | OFFSET 20000000 |
| #define | USE_TREE_BASED_FOR_DATA_CENTRIC |
Functions | |
| INT32 | Usage2 () |
| VOID | ImageUnload (IMG img, VOID *v) |
| void | ClientInit (int argc, char *argv[]) |
| VOID | SimpleCCTQuery (THREADID id, const uint32_t slot) |
| uint32_t | getIndex (uint64_t beg, uint64_t end, void *addr, uint32_t sysIndex, THREADID threadId) |
| void | updateDataList (void *addr, DataHandle_t data, THREADID threadId) |
| VOID | MemAnalysisRoutine (void *addr, THREADID threadId) |
| VOID | InstrumentInsCallback (INS ins, VOID *v, const uint32_t slot) |
| int | main (int argc, char *argv[]) |
Variables | |
| FILE * | gTraceFile |
| PIN_LOCK | clientLock |
| long long | CTR = 0 |
| int | WINDOW_WIDTH = 500 * 1000 |
| int | MAX_WINDOW_ALLOWED = 1000 |
| int | ChunkSize = 512 * (1 << 10) |
| int | window |
| int | TH = 0 |
| bool | outputflag = true |
| bool | errflag = true |
| float | OutputTH = 0.5 |
| unordered_map< uint32_t, DataObj > | DataObjectMap |
| unordered_map< uint32_t, long * > | DataWindowMap |
| unordered_map< uint32_t, int * > | DataThreadMap |
| #define OFFSET 20000000 |
Definition at line 22 of file cct_data_name.cpp.
| #define USE_TREE_BASED_FOR_DATA_CENTRIC |
Definition at line 27 of file cct_data_name.cpp.
| void ClientInit | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 193 of file cct_data_name.cpp.
References gTraceFile, ImageUnload(), and MAX_FILE_PATH.
Referenced by main().
| uint32_t getIndex | ( | uint64_t | beg, |
| uint64_t | end, | ||
| void * | addr, | ||
| uint32_t | sysIndex, | ||
| THREADID | threadId | ||
| ) |
Definition at line 226 of file cct_data_name.cpp.
References ChunkSize, clientLock, errflag, and OFFSET.
Referenced by updateDataList().
| VOID ImageUnload | ( | IMG | img, |
| VOID * | v | ||
| ) |
Definition at line 69 of file cct_data_name.cpp.
References DataObj::counter, CTR, DataObj::data, DataObjectMap, DataThreadMap, DataWindowMap, PinCCTLib::DYNAMIC_OBJECT, gTraceFile, MAX_WINDOW_ALLOWED, OFFSET, outputflag, PinCCTLib::PrintFullCallingContext(), PinCCTLib::STATIC_OBJECT, window, and WINDOW_WIDTH.
Referenced by ClientInit().
| VOID InstrumentInsCallback | ( | INS | ins, |
| VOID * | v, | ||
| const uint32_t | slot | ||
| ) |
Definition at line 336 of file cct_data_name.cpp.
References MemAnalysisRoutine(), and SimpleCCTQuery().
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 360 of file cct_data_name.cpp.
References ClientInit(), gTraceFile, InstrumentInsCallback(), INTERESTING_INS_ALL, PinCCTLib::PinCCTLibInit(), and Usage2().
| VOID MemAnalysisRoutine | ( | void * | addr, |
| THREADID | threadId | ||
| ) |
Definition at line 308 of file cct_data_name.cpp.
References clientLock, CTR, PinCCTLib::DYNAMIC_OBJECT, PinCCTLib::GetDataObjectHandle(), PinCCTLib::STACK_OBJECT, PinCCTLib::STATIC_OBJECT, updateDataList(), window, and WINDOW_WIDTH.
Referenced by InstrumentInsCallback().
| VOID SimpleCCTQuery | ( | THREADID | id, |
| const uint32_t | slot | ||
| ) |
Definition at line 221 of file cct_data_name.cpp.
References PinCCTLib::GetContextHandle().
Referenced by InstrumentInsCallback().
| void updateDataList | ( | void * | addr, |
| DataHandle_t | data, | ||
| THREADID | threadId | ||
| ) |
Definition at line 249 of file cct_data_name.cpp.
References clientLock, DataObj::counter, data, DataObj::data, DataObjectMap, DataThreadMap, DataWindowMap, getIndex(), MAX_WINDOW_ALLOWED, and window.
Referenced by MemAnalysisRoutine().
| INT32 Usage2 | ( | ) |
Definition at line 34 of file cct_data_name.cpp.
Referenced by main().
| int ChunkSize = 512 * (1 << 10) |
Definition at line 54 of file cct_data_name.cpp.
Referenced by getIndex().
| PIN_LOCK clientLock |
Definition at line 48 of file cct_data_name.cpp.
Referenced by getIndex(), MemAnalysisRoutine(), and updateDataList().
| long long CTR = 0 |
Definition at line 51 of file cct_data_name.cpp.
Referenced by ImageUnload(), and MemAnalysisRoutine().
| unordered_map<uint32_t, DataObj> DataObjectMap |
Definition at line 62 of file cct_data_name.cpp.
Referenced by ImageUnload(), and updateDataList().
| unordered_map<uint32_t, int*> DataThreadMap |
Definition at line 64 of file cct_data_name.cpp.
Referenced by ImageUnload(), and updateDataList().
| unordered_map<uint32_t, long*> DataWindowMap |
Definition at line 63 of file cct_data_name.cpp.
Referenced by ImageUnload(), and updateDataList().
| bool errflag = true |
Definition at line 60 of file cct_data_name.cpp.
Referenced by getIndex().
| FILE* gTraceFile |
Definition at line 39 of file cct_data_name.cpp.
Referenced by ClientInit(), ImageUnload(), and main().
| int MAX_WINDOW_ALLOWED = 1000 |
Definition at line 53 of file cct_data_name.cpp.
Referenced by ImageUnload(), and updateDataList().
| bool outputflag = true |
Definition at line 59 of file cct_data_name.cpp.
Referenced by ImageUnload().
| float OutputTH = 0.5 |
Definition at line 61 of file cct_data_name.cpp.
| int TH = 0 |
Definition at line 57 of file cct_data_name.cpp.
| int window |
Definition at line 56 of file cct_data_name.cpp.
Referenced by ImageUnload(), MemAnalysisRoutine(), and updateDataList().
| int WINDOW_WIDTH = 500 * 1000 |
Definition at line 52 of file cct_data_name.cpp.
Referenced by ImageUnload(), and MemAnalysisRoutine().