}
int update_iostream_ret(struct lttngtop *ctx, int tid, char *comm,
}
int update_iostream_ret(struct lttngtop *ctx, int tid, char *comm,
- unsigned long timestamp, uint64_t cpu_id, int ret)
+ unsigned long timestamp, uint64_t cpu_id, int ret,
+ char *hostname)
- tmp = get_proc(ctx, tid, comm, timestamp);
+ tmp = get_proc(ctx, tid, comm, timestamp, hostname);
/*
* if we encounter an exit_syscall and
* it is not for a syscall read or write
* we just abort the execution of this callback
*/
/*
* if we encounter an exit_syscall and
* it is not for a syscall read or write
* we just abort the execution of this callback
*/
- if ((update_iostream_ret(<tngtop, tid, comm, timestamp, cpu_id, ret)) < 0)
+ if ((update_iostream_ret(<tngtop, tid, comm, timestamp, cpu_id,
+ ret, hostname)) < 0)
- tmp = get_proc(<tngtop, tid, procname, timestamp);
+ tmp = get_proc(<tngtop, tid, procname, timestamp, hostname);
+ if (!tmp)
+ goto end;
+
tmp->syscall_info = create_syscall_info(__NR_write, cpu_id, tid, fd);
insert_file(tmp, fd);
tmp->syscall_info = create_syscall_info(__NR_write, cpu_id, tid, fd);
insert_file(tmp, fd);
- tmp = get_proc(<tngtop, tid, procname, timestamp);
+ tmp = get_proc(<tngtop, tid, procname, timestamp, hostname);
+ if (!tmp)
+ goto end;
+
tmp->syscall_info = create_syscall_info(__NR_read, cpu_id, tid, fd);
insert_file(tmp, fd);
tmp->syscall_info = create_syscall_info(__NR_read, cpu_id, tid, fd);
insert_file(tmp, fd);
- tmp = get_proc(<tngtop, tid, procname, timestamp);
+ tmp = get_proc(<tngtop, tid, procname, timestamp, hostname);
+ if (!tmp)
+ goto end;
+
tmp->syscall_info = create_syscall_info(__NR_open, cpu_id, tid, -1);
tmp->files_history = create_file(tmp->files_history, file);
tmp->syscall_info = create_syscall_info(__NR_open, cpu_id, tid, -1);
tmp->files_history = create_file(tmp->files_history, file);
- tmp = get_proc(<tngtop, tid, procname, timestamp);
+ tmp = get_proc(<tngtop, tid, procname, timestamp, hostname);
+ if (!tmp)
+ goto end;
parent->files_history = create_file(parent->files_history, file_name);
file = parent->files_history->file;
edit_file(parent, file, fd);
parent->files_history = create_file(parent->files_history, file_name);
file = parent->files_history->file;
edit_file(parent, file, fd);