+ /* Return code of a syscall if it was the last displayed event. */
+ if (last_syscall && last_syscall->ts_start == prev_ts) {
+ if (last_syscall->cpu_id == cpu_id) {
+ int64_t syscall_ret;
+
+ delta = timestamp - last_syscall->ts_start;
+ scope = bt_ctf_get_top_level_scope(call_data,
+ BT_EVENT_FIELDS);
+ syscall_ret = bt_ctf_get_int64(bt_ctf_get_field(call_data,
+ scope, "_ret"));
+
+ printf(" = %" PRId64 " (+%" PRIu64 ".%09" PRIu64 ")\n",
+ syscall_ret, delta / NSEC_PER_SEC,
+ delta % NSEC_PER_SEC);
+ last_syscall = NULL;
+ goto end;
+ } else {
+ last_syscall = NULL;
+ printf(" ...interrupted...\n");
+ }
+ }
+