mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
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:
committed by
Compute-Runtime-Automation
parent
16b0ebe372
commit
c7ce397b17
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user