
Modules | |
| Initialize | |
| Get the perf results | |
Classes | |
| class | INTELLI::ThreadPerf |
| The all-in-on perf class for thread. More... | |
Typedefs | |
| typedef enum INTELLI::perfTrace | INTELLI::perfIdx |
Enumerations | |
| enum | INTELLI::perfTrace { TRACE_RUNNING_TIME = -1 , COUNT_SW_CPU_CLOCK = 0 , COUNT_SW_TASK_CLOCK = 1 , COUNT_SW_CONTEXT_SWITCHES = 2 , COUNT_SW_CPU_MIGRATIONS = 3 , COUNT_SW_PAGE_FAULTS = 4 , COUNT_SW_PAGE_FAULTS_MIN = 5 , COUNT_SW_PAGE_FAULTS_MAJ = 6 , COUNT_HW_CPU_CYCLES = 7 , COUNT_HW_INSTRUCTIONS = 8 , COUNT_HW_CACHE_REFERENCES = 9 , COUNT_HW_CACHE_MISSES = 10 , COUNT_HW_BRANCH_INSTRUCTIONS = 11 , COUNT_HW_BRANCH_MISSES = 12 , COUNT_HW_BUS_CYCLES = 13 , COUNT_HW_CACHE_L1D_LOADS = 14 , COUNT_HW_CACHE_L1D_LOADS_MISSES = 15 , COUNT_HW_CACHE_L1D_STORES = 16 , COUNT_HW_CACHE_L1D_STORES_MISSES = 17 , COUNT_HW_CACHE_L1D_PREFETCHES = 18 , COUNT_HW_CACHE_L1I_LOADS = 19 , COUNT_HW_CACHE_L1I_LOADS_MISSES = 20 , COUNT_HW_CACHE_LL_LOADS = 21 , COUNT_HW_CACHE_LL_LOADS_MISSES = 22 , COUNT_HW_CACHE_LL_STORES = 23 , COUNT_HW_CACHE_LL_STORES_MISSES = 24 , COUNT_HW_CACHE_DTLB_LOADS = 25 , COUNT_HW_CACHE_DTLB_LOADS_MISSES = 26 , COUNT_HW_CACHE_DTLB_STORES = 27 , COUNT_HW_CACHE_DTLB_STORES_MISSES = 28 , COUNT_HW_CACHE_ITLB_LOADS = 29 , COUNT_HW_CACHE_ITLB_LOADS_MISSES = 30 , COUNT_HW_CACHE_BPU_LOADS = 31 , COUNT_HW_CACHE_BPU_LOADS_MISSES = 32 } |
| The valid idx for perf. More... | |
Functions | |
| INTELLI::PerfTool::PerfTool (pid_t pid, int cpu) | |
| uint64_t | INTELLI::PerfTool::readPerf (size_t ch) |
| int | INTELLI::PerfTool::startPerf (size_t ch) |
| int | INTELLI::PerfTool::stopPerf (size_t ch) |
| bool | INTELLI::PerfTool::isValidChannel (size_t ch) |
| INTELLI::PerfPair::PerfPair (int _ref, string _name) | |
| The construction function. More... | |
| string | INTELLI::ThreadPerf::getChValueAsString (size_t idx) |
| uint64_t | INTELLI::ThreadPerf::getRunTime (void) |
Variables | |
| int | INTELLI::PerfEntry::fds |
| bool | INTELLI::PerfEntry::addressable |
| uint64_t | INTELLI::PerfEntry::prevVale |
| int | INTELLI::PerfPair::ref |
| std::string | INTELLI::PerfPair::name |
| uint64_t | INTELLI::PerfPair::record |
| PerfToolPtr | INTELLI::ThreadPerf::myTool |
| vector< PerfPair > | INTELLI::ThreadPerf::pairs |
| struct timeval ts | INTELLI::ThreadPerf::te |
| uint64_t | INTELLI::ThreadPerf::latency |
Use this tool to perf your thread in an easy way. Organized as Initialize and Get the perf results. The following is an example to use
ThreadPerf tp(-1, {PerfPair(COUNT_HW_CPU_CYCLES, "Cycles"), \
PerfPair(COUNT_HW_INSTRUCTIONS, "instructions")
}
); // creat a ThreadPerf with specific events
tp.start(); //start it
// run your program here
tp.end();
cout<<tp.headStringPrintf()<<endl;
cout<<tp.resultStringPrintf()<<endl;
//print the results
| enum INTELLI::perfTrace |
The valid idx for perf.
|
inline |
The construction function.
| _ref | number index, one in perfTrace |
| _name | string index |
| std::string INTELLI::PerfPair::name |
The string to find pair
| uint64_t INTELLI::PerfPair::record |
The read result
| int INTELLI::PerfPair::ref |
The number to find pair