-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When we read a file with this test app (calling read or __read_chk), I observed that we do not produce an fs.read metric event. Also, in the fs.close event associated with the file read, file_read_bytes does not change from 0.
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#define SIZE 512
static int fd;
static char buf[SIZE];
void verify_read(void) {
//__read_chk(fd, buf, SIZE, SIZE);
read(fd, buf, SIZE);
}
void setup(void) {
memset(buf, '*', SIZE);
fd = open("testfile", O_RDWR | O_CREAT, 0700);
write(fd, buf, SIZE);
}
void cleanup(void) {
if (fd > 0) close(fd);
}
int main() {
setup();
verify_read();
cleanup();
}
We do see expected results using other commands:
SCOPE_EVENT_METRIC=true ./bin/linux/x86_64/scope head [some file]
scope events
Metadata
Metadata
Assignees
Labels
No labels