Processor Counter Monitor
Classes | Macros | Typedefs | Functions | Variables
pcm-memory.cpp File Reference

Example of using CPU counters: implements a performance counter monitoring utility for memory controller channels and DIMMs (ranks) + PMM memory traffic. More...

#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <sys/time.h>
#include <math.h>
#include <iomanip>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <assert.h>
#include "cpucounters.h"
#include "utils.h"
Include dependency graph for pcm-memory.cpp:

Classes

struct  memdata
 

Macros

#define PCM_DELAY_DEFAULT   1.0
 
#define PCM_DELAY_MIN   0.015
 
#define DEFAULT_DISPLAY_COLUMNS   2
 

Typedefs

typedef struct memdata memdata_t
 

Functions

bool anyPmem (const ServerUncoreMemoryMetrics &metrics)
 
void print_help (const string &prog_name)
 
void printSocketBWHeader (uint32 no_columns, uint32 skt, const bool show_channel_output)
 
void printSocketRankBWHeader (uint32 no_columns, uint32 skt)
 
void printSocketRankBWHeader_cvt (const uint32 numSockets, const uint32 num_imc_channels, const int rankA, const int rankB)
 
void printSocketChannelBW (PCM *, memdata_t *md, uint32 no_columns, uint32 skt)
 
void printSocketChannelBW (uint32 no_columns, uint32 skt, uint32 num_imc_channels, const ServerUncoreCounterState *uncState1, const ServerUncoreCounterState *uncState2, uint64 elapsedTime, int rankA, int rankB)
 
void printSocketChannelBW_cvt (const uint32 numSockets, const uint32 num_imc_channels, const ServerUncoreCounterState *uncState1, const ServerUncoreCounterState *uncState2, const uint64 elapsedTime, const int rankA, const int rankB)
 
float AD_BW (const memdata_t *md, const uint32 skt)
 
float PMM_MM_Ratio (const memdata_t *md, const uint32 skt)
 
void printSocketBWFooter (uint32 no_columns, uint32 skt, const memdata_t *md)
 
void display_bandwidth (PCM *m, memdata_t *md, const uint32 no_columns, const bool show_channel_output, const bool print_update)
 
void display_bandwidth_csv (PCM *m, memdata_t *md, uint64, const bool show_channel_output, const CsvOutputType outputType)
 
void calculate_bandwidth (PCM *m, const ServerUncoreCounterState uncState1[], const ServerUncoreCounterState uncState2[], const uint64 elapsedTime, const bool csv, bool &csvheader, uint32 no_columns, const ServerUncoreMemoryMetrics &metrics, const bool show_channel_output, const bool print_update)
 
void calculate_bandwidth_rank (PCM *m, const ServerUncoreCounterState uncState1[], const ServerUncoreCounterState uncState2[], const uint64 elapsedTime, const bool csv, bool &csvheader, const uint32 no_columns, const int rankA, const int rankB)
 
int main (int argc, char *argv[])
 

Variables

constexpr uint32 max_sockets = 256
 
uint32 max_imc_channels = ServerUncoreCounterState::maxChannels
 
const uint32 max_edc_channels = ServerUncoreCounterState::maxChannels
 
const uint32 max_imc_controllers = ServerUncoreCounterState::maxControllers
 
bool skipInactiveChannels = true
 

Detailed Description

Example of using CPU counters: implements a performance counter monitoring utility for memory controller channels and DIMMs (ranks) + PMM memory traffic.