X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Fiostreamtop.c;fp=src%2Fiostreamtop.c;h=f20fcecd81ec752a88b6ddf25559ab82d752aa81;hp=367fdee6ef2e281c2cbcbde3bc0019b74872ac08;hb=9f2856ad8e6efb7b5c1db062babb1276242dd444;hpb=ec016cb4cf5cc8faa6d09476fb6bc1818da8e8fe diff --git a/src/iostreamtop.c b/src/iostreamtop.c index 367fdee..f20fcec 100644 --- a/src/iostreamtop.c +++ b/src/iostreamtop.c @@ -400,7 +400,6 @@ error: return BT_CB_ERROR_STOP; } - enum bt_cb_ret handle_sys_open(struct bt_ctf_event *call_data, void *private_data) { @@ -447,6 +446,43 @@ error: return BT_CB_ERROR_STOP; } +enum bt_cb_ret handle_sys_socket(struct bt_ctf_event *call_data, + void *private_data) +{ + + struct processtop *tmp; + unsigned long timestamp; + uint64_t cpu_id; + int64_t tid; + char *procname, *hostname; + char *file; + + timestamp = bt_ctf_get_timestamp(call_data); + if (timestamp == -1ULL) + goto error; + + tid = get_context_tid(call_data); + cpu_id = get_cpu_id(call_data); + + procname = get_context_comm(call_data); + hostname = get_context_hostname(call_data); + + file = strdup("socket"); + + 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); + +end: + return BT_CB_OK; + +error: + return BT_CB_ERROR_STOP; +} enum bt_cb_ret handle_sys_close(struct bt_ctf_event *call_data, void *private_data)