Add IPC performance counter for Linux

This commit is contained in:
Hisham Muhammad
2018-01-29 12:08:56 -02:00
parent b9f5892593
commit 61e94c1b5b
6 changed files with 87 additions and 5 deletions

View File

@ -10,11 +10,14 @@ in the source distribution for its full text.
*/
#include "PerfCounter.h"
#define PROCESS_FLAG_LINUX_IOPRIO 0x0100
#define PROCESS_FLAG_LINUX_OPENVZ 0x0200
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
#define PROCESS_FLAG_LINUX_CGROUP 0x0800
#define PROCESS_FLAG_LINUX_OOM 0x1000
#define PROCESS_FLAG_LINUX_HPC 0x2000
typedef enum UnsupportedProcessFields {
FLAGS = 9,
@ -78,7 +81,10 @@ typedef enum LinuxProcessFields {
PERCENT_IO_DELAY = 117,
PERCENT_SWAP_DELAY = 118,
#endif
LAST_PROCESSFIELD = 119,
#ifdef HAVE_PERFCOUNTERS
IPC = 119,
#endif
LAST_PROCESSFIELD = 120,
} LinuxProcessField;
#include "IOPriority.h"
@ -131,6 +137,11 @@ typedef struct LinuxProcess_ {
float blkio_delay_percent;
float swapin_delay_percent;
#endif
#ifdef HAVE_PERFCOUNTERS
PerfCounter* cycleCounter;
PerfCounter* insnCounter;
double ipc;
#endif
} LinuxProcess;
#ifndef Process_isKernelThread