X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fiostreamtop.c;h=f455e78a20ec0e345c66a713e1ddde3be92f8b43;hb=3439955e838cd626b61ca36e37f80a104966a8fe;hp=62b926ecb76de51934a864292153d19d582217d8;hpb=59288610ca44efca4b68b954b7ffccd06fecd2b7;p=lttngtop.git diff --git a/src/iostreamtop.c b/src/iostreamtop.c index 62b926e..f455e78 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -199,13 +199,15 @@ int update_iostream_ret(struct lttngtop *ctx, int tid, char *comm, tmp->totalfileread += ret; tmp->fileread += ret; tmpfile = get_file(tmp, tmp->syscall_info->fd); - tmpfile->read += ret; + if (tmpfile) + tmpfile->read += ret; } else if (tmp->syscall_info->type == __NR_write && ret > 0) { tmp->totalfilewrite += ret; tmp->filewrite += ret; tmpfile = get_file(tmp, tmp->syscall_info->fd); - tmpfile->write += ret; + if (tmpfile) + tmpfile->write += ret; } else if (tmp->syscall_info->type == __NR_open && ret > 0) { tmpfile = tmp->files_history->file; @@ -251,7 +253,7 @@ struct file_history *create_file(struct file_history *history, char *file_name) return new_history; } -enum bt_cb_ret handle_exit_syscall(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_exit_syscall(struct ctf_event_definition *call_data, void *private_data) { const struct definition *scope; @@ -293,7 +295,7 @@ error: } -enum bt_cb_ret handle_sys_write(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_sys_write(struct ctf_event_definition *call_data, void *private_data) { const struct definition *scope; @@ -332,7 +334,7 @@ error: return BT_CB_ERROR_STOP; } -enum bt_cb_ret handle_sys_read(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_sys_read(struct ctf_event_definition *call_data, void *private_data) { struct processtop *tmp; @@ -372,7 +374,7 @@ error: } -enum bt_cb_ret handle_sys_open(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_sys_open(struct ctf_event_definition *call_data, void *private_data) { @@ -413,7 +415,7 @@ error: } -enum bt_cb_ret handle_sys_close(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_sys_close(struct ctf_event_definition *call_data, void *private_data) { const struct definition *scope; @@ -449,7 +451,7 @@ error: return BT_CB_ERROR_STOP; } -enum bt_cb_ret handle_statedump_file_descriptor(struct bt_ctf_event *call_data, +enum bt_cb_ret handle_statedump_file_descriptor(struct ctf_event_definition *call_data, void *private_data) { const struct definition *scope;