Metrics IP Sampling Add Support for Streamer APIs

This Patch adds support for collecting IP Metrics using
StreamerOpen, StreamerClose and StreamerReadData

Related-To: LOCI-2755
Related-To: LOCI-2756

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2022-03-02 06:59:39 +00:00
committed by Compute-Runtime-Automation
parent 16b0ebe372
commit c7ce397b17
17 changed files with 767 additions and 89 deletions

View File

@@ -49,6 +49,7 @@ ssize_t (*sysCallsPread)(int fd, void *buf, size_t count, off_t offset) = nullpt
int (*sysCallsReadlink)(const char *path, char *buf, size_t bufsize) = nullptr;
int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void *arg) = nullptr;
int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout) = nullptr;
ssize_t (*sysCallsRead)(int fd, void *buf, size_t count) = nullptr;
int close(int fileDescriptor) {
closeFuncCalled++;
@@ -196,5 +197,12 @@ int munmap(void *addr, size_t size) {
return 0;
}
ssize_t read(int fd, void *buf, size_t count) {
if (sysCallsRead != nullptr) {
return sysCallsRead(fd, buf, count);
}
return 0;
}
} // namespace SysCalls
} // namespace NEO

View File

@@ -15,6 +15,7 @@ extern ssize_t (*sysCallsPread)(int fd, void *buf, size_t count, off_t offset);
extern int (*sysCallsReadlink)(const char *path, char *buf, size_t bufsize);
extern int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void *arg);
extern int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout);
extern ssize_t (*sysCallsRead)(int fd, void *buf, size_t count);
} // namespace SysCalls
} // namespace NEO