|
CCTLib
Calling-context and data-object attribution library for Intel Pin
|
#include <stdio.h>#include <stdlib.h>#include "pin.H"#include <map>#include <unordered_map>#include <list>#include <inttypes.h>#include <stdint.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/shm.h>#include <semaphore.h>#include <sys/stat.h>#include <fcntl.h>#include <iostream>#include <locale>#include <unistd.h>#include <sys/syscall.h>#include <assert.h>#include <sys/mman.h>#include <exception>#include <sys/time.h>#include <signal.h>#include <string.h>#include <setjmp.h>#include <sstream>#include <fstream>#include <google/sparse_hash_map>#include <google/dense_hash_map>#include "cctlib.H"
Include dependency graph for deadspy_client.cpp:Go to the source code of this file.
Classes | |
| struct | DeadSpyThreadData |
| struct | DeadInfo |
| struct | MergedDeadInfo |
| struct | DeadInfoForPresentation |
Functions | |
| KNOB< UINT32 > | KnobTopN (KNOB_MODE_WRITEONCE, "pintool", "d", "0", "how many top contexts to log") |
| DeadSpyThreadData * | ClientGetTLS (const THREADID threadId) |
| void | InitThreadData (DeadSpyThreadData *const tdata) |
| bool | DeadInfoComparer (const DeadInfo &first, const DeadInfo &second) |
| bool | IsValidIP (DeadInfo di) |
| VOID | Instruction (INS ins, VOID *v, const uint32_t opaqueHandle) |
| VOID | InstructionContributionOfBBL1Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBL2Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBL4Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBL8Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBL10Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBL16Byte (uint32_t count, THREADID threadId) |
| VOID | InstructionContributionOfBBLLargeByte (uint32_t count, THREADID threadId) |
| static void | InstrumentTrace (TRACE trace, void *f) |
| uint8_t * | GetOrCreateShadowBaseAddress (void *address) |
| uint8_t * | GetShadowBaseAddress (void *address) |
| VOID | Record1ByteMemRead (VOID *addr) |
| VOID | Record1ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record1ByteMemWriteWithoutDead (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record2ByteMemRead (VOID *addr) |
| VOID | Record2ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record4ByteMemRead (VOID *addr) |
| VOID | Record4ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record8ByteMemRead (VOID *addr) |
| VOID | Record8ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record10ByteMemRead (VOID *addr) |
| VOID | Record10ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | Record16ByteMemRead (VOID *addr) |
| VOID | Record16ByteMemWrite (VOID *addr, const uint32_t opaqueHandle, THREADID threadId) |
| VOID | RecordLargeMemRead (VOID *addr, UINT32 size) |
| VOID | RecordLargeMemWrite (VOID *addr, UINT32 size, const uint32_t opaqueHandle, THREADID threadId) |
| void | InspectMemRead (VOID *addr, UINT32 sz) |
| VOID | Instruction (INS ins, void *v, const uint32_t opaqueHandle) |
| uint64_t | GetTotalNByteWrites (uint32_t size) |
| uint64_t | GetMeasurementBaseCount () |
| void | PrintEachSizeWrite () |
| VOID | Fini (INT32 code, VOID *v) |
| VOID | SyscallEntry (THREADID threadIndex, CONTEXT *ctxt, SYSCALL_STANDARD std, VOID *v) |
| bool | MergedDeadInfoComparer (const DeadInfoForPresentation &first, const DeadInfoForPresentation &second) |
| VOID | PrintIPAndCallingContexts (const DeadInfoForPresentation &di, uint64_t measurementBaseCount) |
| VOID | ImageUnload (IMG img, VOID *v) |
| void | InitDeadSpy (int argc, char *argv[]) |
| static INT32 | Usage () |
| static VOID | ThreadStart (THREADID threadid, CONTEXT *ctxt, INT32 flags, VOID *v) |
| int | main (int argc, char *argv[]) |
Variables | |
| FILE * | gTraceFile |
| std::fstream | topnStream |
| static TLS_KEY | client_tls_key |
| struct { | |
| char dummy1 [128] | |
| string topNLogFileName | |
| char dummy2 [128] | |
| } | DeadSpyGlobals |
| PIN_LOCK | lock |
| uint8_t ** | gL1PageTable [LEVEL_1_PAGE_TABLE_SIZE] |
| unordered_map< uint64_t, uint64_t > | DeadMap |
| unordered_map< uint64_t, uint64_t >::iterator | gDeadMapIt |
| uint64_t | gTotalDead = 0 |
| volatile uint32_t | gClientNumThreads |
| #define __STDC_FORMAT_MACROS |
Definition at line 6 of file deadspy_client.cpp.
| #define CONTEXT_HASH_128BITS_TO_64BITS | ( | curCtxt, | |
| oldCtxt, | |||
| hashVar | |||
| ) |
Definition at line 395 of file deadspy_client.cpp.
| #define CONTINUOUS_DEADINFO |
Definition at line 50 of file deadspy_client.cpp.
| #define DECLARE_HASHVAR | ( | name | ) | uint64_t name |
Definition at line 412 of file deadspy_client.cpp.
| #define EIGHT_BYTE_READ_ACTION (0) |
Definition at line 88 of file deadspy_client.cpp.
| #define EIGHT_BYTE_WRITE_ACTION (0xffffffffffffffff) |
Definition at line 93 of file deadspy_client.cpp.
| #define FOUR_BYTE_READ_ACTION (0) |
Definition at line 87 of file deadspy_client.cpp.
| #define FOUR_BYTE_WRITE_ACTION (0xffffffff) |
Definition at line 92 of file deadspy_client.cpp.
| #define LEVEL_1_PAGE_TABLE_BITS (20) |
Definition at line 69 of file deadspy_client.cpp.
| #define LEVEL_1_PAGE_TABLE_ENTRIES (1 << LEVEL_1_PAGE_TABLE_BITS) |
Definition at line 70 of file deadspy_client.cpp.
| #define LEVEL_1_PAGE_TABLE_SIZE (LEVEL_1_PAGE_TABLE_ENTRIES * PTR_SIZE) |
Definition at line 71 of file deadspy_client.cpp.
| #define LEVEL_1_PAGE_TABLE_SLOT | ( | addr | ) | ((((uint64_t)addr) >> (LEVEL_2_PAGE_TABLE_BITS + PAGE_OFFSET_BITS)) & 0xfffff) |
Definition at line 77 of file deadspy_client.cpp.
| #define LEVEL_2_PAGE_TABLE_BITS (12) |
Definition at line 73 of file deadspy_client.cpp.
| #define LEVEL_2_PAGE_TABLE_ENTRIES (1 << LEVEL_2_PAGE_TABLE_BITS) |
Definition at line 74 of file deadspy_client.cpp.
| #define LEVEL_2_PAGE_TABLE_SIZE (LEVEL_2_PAGE_TABLE_ENTRIES * PTR_SIZE) |
Definition at line 75 of file deadspy_client.cpp.
| #define LEVEL_2_PAGE_TABLE_SLOT | ( | addr | ) | ((((uint64_t)addr) >> (PAGE_OFFSET_BITS)) & 0xFFF) |
Definition at line 78 of file deadspy_client.cpp.
| #define MAX_CCT_PRINT_DEPTH (20) |
Definition at line 53 of file deadspy_client.cpp.
| #define MAX_DEAD_CONTEXTS_TO_LOG (1000) |
Definition at line 56 of file deadspy_client.cpp.
| #define MAX_FILE_PATH (200) |
Definition at line 54 of file deadspy_client.cpp.
| #define OLD_CTXT (*lastIP) |
Definition at line 406 of file deadspy_client.cpp.
| #define ONE_BYTE_READ_ACTION (0) |
Definition at line 85 of file deadspy_client.cpp.
| #define ONE_BYTE_WRITE_ACTION (0xff) |
Definition at line 90 of file deadspy_client.cpp.
| #define PAGE_OFFSET | ( | addr | ) | (addr & 0xFFFF) |
Definition at line 61 of file deadspy_client.cpp.
| #define PAGE_OFFSET_BITS (16LL) |
Definition at line 60 of file deadspy_client.cpp.
| #define PAGE_OFFSET_MASK (0xFFFF) |
Definition at line 62 of file deadspy_client.cpp.
| #define PAGE_SIZE (1 << PAGE_OFFSET_BITS) |
Definition at line 65 of file deadspy_client.cpp.
| #define PTR_SIZE (sizeof(void*)) |
Definition at line 68 of file deadspy_client.cpp.
| #define READ_ACTION (0) |
Definition at line 82 of file deadspy_client.cpp.
| #define REPORT_DEAD | ( | curCtxt, | |
| lastCtxt, | |||
| hashVar, | |||
| size | |||
| ) |
Definition at line 414 of file deadspy_client.cpp.
| #define REPORT_IF_DEAD | ( | mask, | |
| curCtxt, | |||
| lastCtxt, | |||
| hashVar | |||
| ) |
Definition at line 440 of file deadspy_client.cpp.
| #define TWO_BYTE_READ_ACTION (0) |
Definition at line 86 of file deadspy_client.cpp.
| #define TWO_BYTE_WRITE_ACTION (0xffff) |
Definition at line 91 of file deadspy_client.cpp.
| #define WRITE_ACTION (0xff) |
Definition at line 83 of file deadspy_client.cpp.
|
inline |
Definition at line 166 of file deadspy_client.cpp.
References client_tls_key.
Referenced by GetTotalNByteWrites(), InstructionContributionOfBBL10Byte(), InstructionContributionOfBBL16Byte(), InstructionContributionOfBBL1Byte(), InstructionContributionOfBBL2Byte(), InstructionContributionOfBBL4Byte(), InstructionContributionOfBBL8Byte(), and InstructionContributionOfBBLLargeByte().
| VOID Fini | ( | INT32 | code, |
| VOID * | v | ||
| ) |
Definition at line 1441 of file deadspy_client.cpp.
References GetMeasurementBaseCount(), gTotalDead, gTraceFile, KnobTopN(), PinCCTLib::SerializeMetadata(), and topnStream.
Referenced by main().
|
inline |
Definition at line 1422 of file deadspy_client.cpp.
References GetTotalNByteWrites().
Referenced by Fini(), and ImageUnload().
|
inline |
Definition at line 348 of file deadspy_client.cpp.
References address, gL1PageTable, LEVEL_1_PAGE_TABLE_SLOT, LEVEL_2_PAGE_TABLE_SIZE, LEVEL_2_PAGE_TABLE_SLOT, and PAGE_SIZE.
Referenced by CopyRegionToShadowMemory(), Record10ByteMemWrite(), Record16ByteMemWrite(), Record1ByteMemWrite(), Record1ByteMemWriteWithoutDead(), Record2ByteMemWrite(), Record4ByteMemWrite(), and Record8ByteMemWrite().
|
inline |
Definition at line 366 of file deadspy_client.cpp.
References address, gL1PageTable, LEVEL_1_PAGE_TABLE_SLOT, and LEVEL_2_PAGE_TABLE_SLOT.
Referenced by Record10ByteMemRead(), Record16ByteMemRead(), Record1ByteMemRead(), Record2ByteMemRead(), Record4ByteMemRead(), Record8ByteMemRead(), and RecordLargeMemRead().
| uint64_t GetTotalNByteWrites | ( | uint32_t | size | ) |
Definition at line 1374 of file deadspy_client.cpp.
References ClientGetTLS(), DeadSpyThreadData::g10ByteWriteInstrCount, DeadSpyThreadData::g16ByteWriteInstrCount, DeadSpyThreadData::g1ByteWriteInstrCount, DeadSpyThreadData::g2ByteWriteInstrCount, DeadSpyThreadData::g4ByteWriteInstrCount, DeadSpyThreadData::g8ByteWriteInstrCount, gClientNumThreads, and DeadSpyThreadData::gLargeByteWriteInstrCount.
Referenced by GetMeasurementBaseCount(), and PrintEachSizeWrite().
| VOID ImageUnload | ( | IMG | img, |
| VOID * | v | ||
| ) |
Definition at line 1542 of file deadspy_client.cpp.
References PinCCTLib::AppendLoadModulesToStream(), MergedDeadInfo::context1, MergedDeadInfo::context2, DeadInfoForPresentation::count, DeadMap, GetMeasurementBaseCount(), gTotalDead, gTraceFile, KnobTopN(), PinCCTLib::LogContexts(), MAX_DEAD_CONTEXTS_TO_LOG, MergedDeadInfoComparer(), DeadInfoForPresentation::pMergedDeadInfo, PrintEachSizeWrite(), PrintIPAndCallingContexts(), PinCCTLib::PrintStats(), and topnStream.
Referenced by main().
| void InitDeadSpy | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1637 of file deadspy_client.cpp.
References gTraceFile, KnobTopN(), MAX_FILE_PATH, and topnStream.
Referenced by main().
|
inline |
Definition at line 186 of file deadspy_client.cpp.
References DeadSpyThreadData::g10ByteWriteInstrCount, DeadSpyThreadData::g16ByteWriteInstrCount, DeadSpyThreadData::g1ByteWriteInstrCount, DeadSpyThreadData::g2ByteWriteInstrCount, DeadSpyThreadData::g4ByteWriteInstrCount, DeadSpyThreadData::g8ByteWriteInstrCount, DeadSpyThreadData::gLargeByteWriteByteCount, and DeadSpyThreadData::gLargeByteWriteInstrCount.
Referenced by ThreadStart().
| void InspectMemRead | ( | VOID * | addr, |
| UINT32 | sz | ||
| ) |
Definition at line 1177 of file deadspy_client.cpp.
| VOID Instruction | ( | INS | ins, |
| VOID * | v, | ||
| const uint32_t | opaqueHandle | ||
| ) |
Definition at line 1115 of file runtime_value_numbering_client.cpp.
References getImmediateValueNum(), IsIgnorableIns(), IsMov(), valueNumbering(), valueNumberingMem1(), valueNumberingMem2(), valueNumberingMem3(), and valueNumberingMem4().
Referenced by main().
| VOID Instruction | ( | INS | ins, |
| void * | v, | ||
| const uint32_t | opaqueHandle | ||
| ) |
Definition at line 1184 of file deadspy_client.cpp.
References Record10ByteMemRead(), Record10ByteMemWrite(), Record16ByteMemRead(), Record16ByteMemWrite(), Record1ByteMemRead(), Record1ByteMemWrite(), Record2ByteMemRead(), Record2ByteMemWrite(), Record4ByteMemRead(), Record4ByteMemWrite(), Record8ByteMemRead(), Record8ByteMemWrite(), RecordLargeMemRead(), RecordLargeMemWrite(), PinCCTLib::ReleaseLock(), and PinCCTLib::TakeLock().
|
inline |
Definition at line 248 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g16ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 251 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g16ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 236 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g1ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 239 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g2ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 242 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g4ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 245 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::g8ByteWriteInstrCount.
Referenced by InstrumentTrace().
|
inline |
Definition at line 254 of file deadspy_client.cpp.
References ClientGetTLS(), and DeadSpyThreadData::gLargeByteWriteInstrCount.
Referenced by InstrumentTrace().
|
static |
Definition at line 260 of file deadspy_client.cpp.
References InstructionContributionOfBBL10Byte(), InstructionContributionOfBBL16Byte(), InstructionContributionOfBBL1Byte(), InstructionContributionOfBBL2Byte(), InstructionContributionOfBBL4Byte(), InstructionContributionOfBBL8Byte(), and InstructionContributionOfBBLLargeByte().
Referenced by main().
|
inline |
Definition at line 1507 of file deadspy_client.cpp.
References DeadInfo::firstIP, and DeadInfo::secondIP.
Referenced by PinCCTLib::GetFullCallingContextInSitu(), and PinCCTLib::GetParentIPs().
| KNOB<UINT32> KnobTopN | ( | KNOB_MODE_WRITEONCE | , |
| "pintool" | , | ||
| "d" | , | ||
| "0" | , | ||
| "how many top contexts to log" | |||
| ) |
Referenced by Fini(), ImageUnload(), and InitDeadSpy().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1699 of file deadspy_client.cpp.
References client_tls_key, Fini(), gTraceFile, ImageUnload(), InitDeadSpy(), Instruction(), InstrumentTrace(), INTERESTING_INS_MEMORY_ACCESS, PinCCTLib::PinCCTLibInit(), SyscallEntry(), ThreadStart(), and Usage().
|
inline |
Definition at line 1504 of file deadspy_client.cpp.
References DeadInfoForPresentation::count.
Referenced by ImageUnload().
|
inline |
Definition at line 1429 of file deadspy_client.cpp.
References GetTotalNByteWrites(), and gTraceFile.
Referenced by ImageUnload().
|
inline |
Definition at line 1531 of file deadspy_client.cpp.
References MergedDeadInfo::context1, MergedDeadInfo::context2, DeadInfoForPresentation::count, gTraceFile, DeadInfoForPresentation::pMergedDeadInfo, and PinCCTLib::PrintFullCallingContext().
Referenced by ImageUnload().
| VOID Record10ByteMemRead | ( | VOID * | addr | ) |
Definition at line 787 of file deadspy_client.cpp.
References EIGHT_BYTE_READ_ACTION, GetShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, Record2ByteMemRead(), Record8ByteMemRead(), PinCCTLib::status, and TWO_BYTE_READ_ACTION.
Referenced by Instruction().
| VOID Record10ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 856 of file deadspy_client.cpp.
References DECLARE_HASHVAR, EIGHT_BYTE_READ_ACTION, EIGHT_BYTE_WRITE_ACTION, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, PAGE_SIZE, Record1ByteMemWrite(), REPORT_DEAD, REPORT_IF_DEAD, PinCCTLib::status, TWO_BYTE_READ_ACTION, and TWO_BYTE_WRITE_ACTION.
Referenced by Instruction().
| VOID Record16ByteMemRead | ( | VOID * | addr | ) |
Definition at line 948 of file deadspy_client.cpp.
References EIGHT_BYTE_READ_ACTION, GetShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, Record8ByteMemRead(), and PinCCTLib::status.
Referenced by Instruction().
| VOID Record16ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 1017 of file deadspy_client.cpp.
References DECLARE_HASHVAR, EIGHT_BYTE_READ_ACTION, EIGHT_BYTE_WRITE_ACTION, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, PAGE_SIZE, Record1ByteMemWrite(), REPORT_DEAD, REPORT_IF_DEAD, and PinCCTLib::status.
Referenced by Instruction().
| VOID Record1ByteMemRead | ( | VOID * | addr | ) |
Definition at line 491 of file deadspy_client.cpp.
References GetShadowBaseAddress(), ONE_BYTE_READ_ACTION, PAGE_OFFSET, and PinCCTLib::status.
Referenced by Instruction(), and SyscallEntry().
| VOID Record1ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 514 of file deadspy_client.cpp.
References DECLARE_HASHVAR, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), OLD_CTXT, ONE_BYTE_WRITE_ACTION, PAGE_OFFSET, PAGE_SIZE, REPORT_DEAD, and PinCCTLib::status.
Referenced by Instruction(), Record10ByteMemWrite(), Record16ByteMemWrite(), Record2ByteMemWrite(), Record4ByteMemWrite(), Record8ByteMemWrite(), and RecordLargeMemWrite().
|
inline |
Definition at line 530 of file deadspy_client.cpp.
References PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), ONE_BYTE_WRITE_ACTION, PAGE_OFFSET, PAGE_SIZE, and PinCCTLib::status.
| VOID Record2ByteMemRead | ( | VOID * | addr | ) |
Definition at line 539 of file deadspy_client.cpp.
References GetShadowBaseAddress(), ONE_BYTE_READ_ACTION, PAGE_OFFSET, PAGE_OFFSET_MASK, PinCCTLib::status, and TWO_BYTE_READ_ACTION.
Referenced by Instruction(), and Record10ByteMemRead().
| VOID Record2ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 564 of file deadspy_client.cpp.
References DECLARE_HASHVAR, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, PAGE_SIZE, Record1ByteMemWrite(), REPORT_DEAD, REPORT_IF_DEAD, PinCCTLib::status, TWO_BYTE_READ_ACTION, and TWO_BYTE_WRITE_ACTION.
Referenced by Instruction().
| VOID Record4ByteMemRead | ( | VOID * | addr | ) |
Definition at line 603 of file deadspy_client.cpp.
References FOUR_BYTE_READ_ACTION, GetShadowBaseAddress(), ONE_BYTE_READ_ACTION, PAGE_OFFSET, PAGE_OFFSET_MASK, and PinCCTLib::status.
Referenced by Instruction().
| VOID Record4ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 637 of file deadspy_client.cpp.
References DECLARE_HASHVAR, FOUR_BYTE_READ_ACTION, FOUR_BYTE_WRITE_ACTION, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, PAGE_SIZE, Record1ByteMemWrite(), REPORT_DEAD, REPORT_IF_DEAD, and PinCCTLib::status.
Referenced by Instruction().
| VOID Record8ByteMemRead | ( | VOID * | addr | ) |
Definition at line 686 of file deadspy_client.cpp.
References EIGHT_BYTE_READ_ACTION, GetShadowBaseAddress(), ONE_BYTE_READ_ACTION, PAGE_OFFSET, PAGE_OFFSET_MASK, and PinCCTLib::status.
Referenced by Instruction(), Record10ByteMemRead(), and Record16ByteMemRead().
| VOID Record8ByteMemWrite | ( | VOID * | addr, |
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 720 of file deadspy_client.cpp.
References DECLARE_HASHVAR, EIGHT_BYTE_READ_ACTION, EIGHT_BYTE_WRITE_ACTION, PinCCTLib::GetContextHandle(), GetOrCreateShadowBaseAddress(), PAGE_OFFSET, PAGE_OFFSET_MASK, PAGE_SIZE, Record1ByteMemWrite(), REPORT_DEAD, REPORT_IF_DEAD, and PinCCTLib::status.
Referenced by Instruction().
| VOID RecordLargeMemRead | ( | VOID * | addr, |
| UINT32 | size | ||
| ) |
Definition at line 1128 of file deadspy_client.cpp.
References GetShadowBaseAddress(), ONE_BYTE_READ_ACTION, PAGE_OFFSET, and PinCCTLib::status.
Referenced by Instruction().
| VOID RecordLargeMemWrite | ( | VOID * | addr, |
| UINT32 | size, | ||
| const uint32_t | opaqueHandle, | ||
| THREADID | threadId | ||
| ) |
Definition at line 1169 of file deadspy_client.cpp.
References Record1ByteMemWrite().
Referenced by Instruction().
| VOID SyscallEntry | ( | THREADID | threadIndex, |
| CONTEXT * | ctxt, | ||
| SYSCALL_STANDARD | std, | ||
| VOID * | v | ||
| ) |
Definition at line 1462 of file deadspy_client.cpp.
References Record1ByteMemRead().
Referenced by main().
|
static |
Definition at line 1689 of file deadspy_client.cpp.
References client_tls_key, gClientNumThreads, and InitThreadData().
Referenced by main().
|
static |
Definition at line 1683 of file deadspy_client.cpp.
Referenced by main().
|
static |
Definition at line 153 of file deadspy_client.cpp.
Referenced by ClientGetTLS(), main(), and ThreadStart().
| unordered_map<uint64_t, uint64_t> DeadMap |
Definition at line 207 of file deadspy_client.cpp.
Referenced by ImageUnload().
| struct { ... } DeadSpyGlobals |
| char dummy1[128] |
Definition at line 156 of file deadspy_client.cpp.
| char dummy2[128] |
Definition at line 158 of file deadspy_client.cpp.
| volatile uint32_t gClientNumThreads |
Definition at line 230 of file deadspy_client.cpp.
Referenced by GetTotalNByteWrites(), and ThreadStart().
| unordered_map<uint64_t, uint64_t>::iterator gDeadMapIt |
Definition at line 208 of file deadspy_client.cpp.
| uint8_t** gL1PageTable[LEVEL_1_PAGE_TABLE_SIZE] |
Definition at line 203 of file deadspy_client.cpp.
Referenced by GetOrCreateShadowBaseAddress(), and GetShadowBaseAddress().
| uint64_t gTotalDead = 0 |
Definition at line 224 of file deadspy_client.cpp.
Referenced by Fini(), and ImageUnload().
| FILE* gTraceFile |
Definition at line 126 of file deadspy_client.cpp.
Referenced by Fini(), ImageUnload(), InitDeadSpy(), main(), PrintEachSizeWrite(), and PrintIPAndCallingContexts().
| PIN_LOCK lock |
Definition at line 197 of file deadspy_client.cpp.
| string topNLogFileName |
Definition at line 157 of file deadspy_client.cpp.
| std::fstream topnStream |
Definition at line 127 of file deadspy_client.cpp.
Referenced by Fini(), ImageUnload(), and InitDeadSpy().