tid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_tid"));
if (bt_ctf_field_get_error()) {
- fprintf(stderr, "Missing tid context info\n");
- return -1ULL;
+ tid = bt_ctf_get_int64(bt_ctf_get_field(event,
+ scope, "_vtid"));
+ if (bt_ctf_field_get_error()) {
+ fprintf(stderr, "Missing tid context info\n");
+ return -1ULL;
+ }
}
return tid;
pid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_pid"));
if (bt_ctf_field_get_error()) {
- fprintf(stderr, "Missing pid context info\n");
- return -1ULL;
+ /* Try UST pid */
+ pid = bt_ctf_get_int64(bt_ctf_get_field(event,
+ scope, "_vpid"));
+ if (bt_ctf_field_get_error()) {
+ fprintf(stderr, "Missing pid context info\n");
+ return -1ULL;
+ }
}
return pid;
ppid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_ppid"));
if (bt_ctf_field_get_error()) {
- fprintf(stderr, "Missing ppid context info\n");
return -1ULL;
}
ppid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
scope, "_ppid"));
if (bt_ctf_field_get_error()) {
- fprintf(stderr, "Missing ppid context info\n");
- goto error;
+ goto end;
}
tid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
scope, "_tid"));
proc->pid = pid;
}
+end:
return BT_CB_OK;
error: