Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
tid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_tid"));
if (bt_ctf_field_get_error()) {
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;
+ }
pid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_pid"));
if (bt_ctf_field_get_error()) {
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;
+ }
ppid = bt_ctf_get_int64(bt_ctf_get_field(event,
scope, "_ppid"));
if (bt_ctf_field_get_error()) {
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");
ppid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
scope, "_ppid"));
if (bt_ctf_field_get_error()) {
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;
}
tid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
scope, "_tid"));
}
tid = bt_ctf_get_int64(bt_ctf_get_field(call_data,
scope, "_tid"));
- printf_verbose("Waiting for %" PRIu64 " streams:\n",
- ctx->session->stream_count);
+ printf_verbose("Waiting for %u streams:\n",
+ be32toh(rp.streams_count));
ctx->session->streams = g_new0(struct lttng_live_viewer_stream,
ctx->session->stream_count);
for (i = 0; i < be32toh(rp.streams_count); i++) {
ctx->session->streams = g_new0(struct lttng_live_viewer_stream,
ctx->session->stream_count);
for (i = 0; i < be32toh(rp.streams_count); i++) {
goto end;
}
if (rp.flags & LTTNG_VIEWER_FLAG_NEW_STREAM) {
goto end;
}
if (rp.flags & LTTNG_VIEWER_FLAG_NEW_STREAM) {
+ printf_verbose("get_data_packet: new streams needed\n");
ret = ask_new_streams(ctx);
if (ret < 0)
goto error;
g_hash_table_foreach(ctx->session->ctf_traces, add_traces,
ctx->bt_ctx);
ret = ask_new_streams(ctx);
if (ret < 0)
goto error;
g_hash_table_foreach(ctx->session->ctf_traces, add_traces,
ctx->bt_ctx);
}
fprintf(stderr, "[error] get_data_packet: error\n");
ret = -1;
}
fprintf(stderr, "[error] get_data_packet: error\n");
ret = -1;
bt_ctf_iter_destroy(iter);
#endif
ret = check_requirements(ctx->bt_ctx);
bt_ctf_iter_destroy(iter);
#endif
ret = check_requirements(ctx->bt_ctx);
+ if (ret < 0 && !valid_trace) {
fprintf(stderr, "[error] some mandatory contexts "
"were missing, exiting.\n");
goto end;
fprintf(stderr, "[error] some mandatory contexts "
"were missing, exiting.\n");
goto end;
int opt_all;
int quit = 0;
int opt_all;
int quit = 0;
+/* We need at least one valid trace to start processing. */
+int valid_trace = 0;
struct lttngtop *copy;
pthread_t display_thread;
struct lttngtop *copy;
pthread_t display_thread;
}
ppid = get_context_ppid(call_data);
if (ppid == -1ULL) {
}
ppid = get_context_ppid(call_data);
if (ppid == -1ULL) {
}
vpid = get_context_vpid(call_data);
if (pid == -1ULL) {
}
vpid = get_context_vpid(call_data);
if (pid == -1ULL) {
ret = -1;
fprintf(stderr, "[error] missing procname context information\n");
}
ret = -1;
fprintf(stderr, "[error] missing procname context information\n");
}
+ if (ret == 0) {
+ valid_trace = 1;
+ }
}
ret = check_requirements(bt_ctx);
}
ret = check_requirements(bt_ctx);
+ if (ret < 0 && !valid_trace) {
fprintf(stderr, "[error] some mandatory contexts "
"were missing, exiting.\n");
fprintf(stderr, "[error] some mandatory contexts "
"were missing, exiting.\n");
extern int opt_textdump;
extern int opt_child;
extern int opt_begin;
extern int opt_textdump;
extern int opt_child;
extern int opt_begin;
extern pthread_t display_thread;
extern pthread_t timer_thread;
extern pthread_t display_thread;
extern pthread_t timer_thread;