From f6c65c2a837d2848e1a51646d8526d4560528019 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Mon, 25 Feb 2013 06:48:29 +0100 Subject: [PATCH] dom0+vm/dispvm: add some timing logs --- qubes_rpc/vm-file-editor.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qubes_rpc/vm-file-editor.c b/qubes_rpc/vm-file-editor.c index 4a83785..9e372ae 100644 --- a/qubes_rpc/vm-file-editor.c +++ b/qubes_rpc/vm-file-editor.c @@ -8,6 +8,16 @@ #include #include "dvm2.h" +char *gettime() +{ + static char retbuf[60]; + struct timeval tv; + gettimeofday(&tv, NULL); + snprintf(retbuf, sizeof(retbuf), "%lld.%lld", + (long long) tv.tv_sec, (long long) tv.tv_usec); + return retbuf; +} + char *get_filename() { char buf[DVM_FILENAME_SIZE]; @@ -67,6 +77,7 @@ main() perror("stat pre"); exit(1); } + fprintf(stderr, "time=%s, waiting for qubes-session\n", gettime()); // wait for X server to starts (especially in DispVM) if (stat("/tmp/qubes-session-env", &session_stat)) { switch (child = fork()) { @@ -95,6 +106,7 @@ main() } } } + fprintf(stderr, "time=%s, starting editor\n", gettime()); switch (child = fork()) { case -1: perror("fork");