The top entity to provide perf traces, please use this class only UNLESS you know what you are doing.
More...
#include <Utils/ThreadPerf.hpp>
|
|
typedef std::shared_ptr< PerfTool > | PerfToolPtr |
| |
|
|
std::string | getChValueAsString (size_t idx) |
| |
|
|
PerfToolPtr | myTool |
| |
|
std::vector< PerfPair > | pairs |
| | To contain all of your interested perf events.
|
| |
|
struct timeval tstart | tend |
| |
|
uint64_t | latency |
| |
The top entity to provide perf traces, please use this class only UNLESS you know what you are doing.
- Note
- You may overwrite the setPerfList function for your own interested events
- Warning
- only works in Linux, and make sure you have opened perf in your kernel and have the access
- Note
- Requires the ConfigMap Util
-
General set up
◆ ThreadPerf()
| INTELLI::ThreadPerf::ThreadPerf |
( |
int |
cpu | ) |
|
|
inline |
To setup this perf to specific cpu.
- Parameters
-
| cpu | >=0 for any specific cpu, =-1 for all cpu that may run this process |
◆ getResultById()
| uint64_t INTELLI::ThreadPerf::getResultById |
( |
size_t |
idx | ) |
|
|
inline |
Get the perf result by its index of PerfPair.
- Parameters
-
- Returns
- The value
◆ getResultByName()
| uint64_t INTELLI::ThreadPerf::getResultByName |
( |
string |
name | ) |
|
|
inline |
Get the perf result by its name of of PerfPair.
- Parameters
-
- Returns
- The value
◆ resultToConfigMap()
convert the perf result into a ConfigMap
- Returns
- The key-value store of configMap, in shared pointer
- Note
- must stop after calling stop
◆ start()
| void INTELLI::ThreadPerf::start |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: