Download and install File:Pmcdriver.zip This install the kernel driver msrdrv which contains all the system calls needed for reading the performance monitoring counters in Intel machines.
So, in the user program just do the following: 1. Load the driver
static int loadDriver() { int fd; fd = open("/dev/" DEV_NAME, O_RDWR); if (fd == -1) { perror("Failed to open /dev/" DEV_NAME); } return fd; }
2. Send sata to driver ioctl(fd, IOCTL_MSR_CMDS, (long long)msr_start);
Download and install File:Pmcdriver.zip This install the kernel driver msrdrv which contains all the system calls needed for reading the performance monitoring counters in Intel machines.
So, in the user program just do the following: 1. Load the driver
static int loadDriver() { int fd; fd = open("/dev/" DEV_NAME, O_RDWR); if (fd == -1) { perror("Failed to open /dev/" DEV_NAME); } return fd; }
2. Send sata to driver ioctl(fd, IOCTL_MSR_CMDS, (long long)msr_start);