begin support for UST in live, not yet perfect but starting to work
[lttngtop.git] / src / lttngtop.c
index 0497b4e6a2adf32542fcfd90a620e74419fe0a6a..326bae832c34745517a4d680325ea496161c9853 100644 (file)
@@ -64,9 +64,10 @@ int opt_textdump;
 int opt_child;
 int opt_begin;
 int opt_all;
-int opt_fd_path;
 
 int quit = 0;
+/* We need at least one valid trace to start processing. */
+int valid_trace = 0;
 
 struct lttngtop *copy;
 pthread_t display_thread;
@@ -100,7 +101,6 @@ enum {
        OPT_KPROBES,
        OPT_BEGIN,
        OPT_ALL,
-       OPT_FD_PATH,
 };
 
 static struct poptOption long_options[] = {
@@ -115,7 +115,6 @@ static struct poptOption long_options[] = {
                OPT_RELAY_HOSTNAME, NULL, NULL },
        { "kprobes", 'k', POPT_ARG_STRING, &opt_kprobes, OPT_KPROBES, NULL, NULL },
        { "all", 'a', POPT_ARG_NONE, NULL, OPT_ALL, NULL, NULL },
-       { NULL, 'y', POPT_ARG_NONE, NULL, OPT_FD_PATH, NULL, NULL },
        { NULL, 0, 0, NULL, 0, NULL, NULL },
 };
 
@@ -334,7 +333,7 @@ enum bt_cb_ret textdump(struct bt_ctf_event *call_data, void *private_data)
                                syscall_ret = bt_ctf_get_int64(bt_ctf_get_field(call_data,
                                                        scope, "_ret"));
 
-                               printf("= %" PRId64 " (+%" PRIu64 ".%09" PRIu64 ")\n",
+                               printf("= %" PRId64 " (%" PRIu64 ".%09" PRIu64 "s)\n",
                                                syscall_ret, delta / NSEC_PER_SEC,
                                                delta % NSEC_PER_SEC);
                                last_syscall = NULL;
@@ -572,7 +571,7 @@ enum bt_cb_ret fix_process_table(struct bt_ctf_event *call_data,
        }
        ppid = get_context_ppid(call_data);
        if (ppid == -1ULL) {
-               goto error;
+               goto end;
        }
        vpid = get_context_vpid(call_data);
        if (pid == -1ULL) {
@@ -774,9 +773,6 @@ static int parse_options(int argc, char **argv)
                        case OPT_ALL:
                                opt_all = 1;
                                break;
-                       case OPT_FD_PATH:
-                               opt_fd_path = 1;
-                               break;
                        case OPT_CHILD:
                                opt_child = 1;
                                break;
@@ -1169,6 +1165,9 @@ int check_requirements(struct bt_context *ctx)
                ret = -1;
                fprintf(stderr, "[error] missing procname context information\n");
        }
+       if (ret == 0) {
+               valid_trace = 1;
+       }
 
 end:
        return ret;
@@ -1245,10 +1244,10 @@ int main(int argc, char **argv, char **envp)
                }
 
                ret = check_requirements(bt_ctx);
-               if (ret < 0) {
+               if (ret < 0 && !valid_trace) {
                        fprintf(stderr, "[error] some mandatory contexts "
                                        "were missing, exiting.\n");
-                       goto end;
+                       //goto end;
                }
 
                if (!opt_textdump) {
This page took 0.023707 seconds and 4 git commands to generate.