}
file->fd = fd;
file->flag = __NR_open;
+ lttngtop.nbfiles++;
+ lttngtop.nbnewfiles++;
}
/* TODO */
tmp->fd = fd;
add_file(proc, tmp, fd);
} else {
-
tmp = g_ptr_array_index(proc->process_files_table, fd);
if (tmp == NULL) {
tmp = g_new0(struct files, 1);
{
struct files *file;
-
file = get_file(proc, fd);
- if (file != NULL)
+ if (file != NULL) {
file->flag = __NR_close;
+ lttngtop.nbfiles--;
+ }
+ lttngtop.nbclosedfiles++;
}
struct files *get_file(struct processtop *proc, int fd)