From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr8Qn-0006us-9Y for qemu-devel@nongnu.org; Tue, 17 Jul 2012 10:07:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr8Qd-0005Cz-Os for qemu-devel@nongnu.org; Tue, 17 Jul 2012 10:07:17 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:35998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr8Qd-0005Cd-HF for qemu-devel@nongnu.org; Tue, 17 Jul 2012 10:07:07 -0400 Received: by lbok6 with SMTP id k6so758282lbo.4 for ; Tue, 17 Jul 2012 07:07:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1341307259-27262-1-git-send-email-harsh@linux.vnet.ibm.com> References: <1341307259-27262-1-git-send-email-harsh@linux.vnet.ibm.com> Date: Tue, 17 Jul 2012 15:07:05 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH v7 0/3] Simpletrace v2: Support multiple args, strings. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Harsh Prateek Bora Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On Tue, Jul 3, 2012 at 10:20 AM, Harsh Prateek Bora wrote: > Existing simpletrace backend allows to trace at max 6 args and does not > support strings. This newer tracelog format gets rid of fixed size records > and therefore allows to trace variable number of args including strings. > > Sample trace: > v9fs_version 0.000 tag=0xffff id=0x64 msize=0x2000 version=9P2000.L > v9fs_version_return 6.705 tag=0xffff id=0x64 msize=0x2000 version=9P2000.L > v9fs_attach 174.467 tag=0x1 id=0x68 fid=0x0 afid=0xffffffffffffffff > uname=nobody aname= > v9fs_attach_return 4720.454 tag=0x1 id=0x68 type=0xffffffffffffff80 > version=0x4f2a4dd0 path=0x220ea6 The writeout thread deadlocked itself when it called g_malloc() and therefore became a tracing thread: Thread 3 (Thread 0x7fad8b144700 (LWP 1387)): #0 0x00007ffffa1e88de in ?? () #1 0x00007fad9421de86 in *__GI_clock_gettime (clock_id=clock_id@entry=1, tp=tp@entry=0x7fad8b143be0) at ../sysdeps/unix/clock_gettime.c:116 #2 0x00007fad94813e46 in get_clock () at ./qemu-timer.h:124 #3 trace_record_start (rec=rec@entry=0x7fad8b143c10, event=140383339428832, event@entry=0, datasize=datasize@entry=16) at trace/simple.c:219 #4 0x00007fad947f7185 in trace_g_malloc (size=size@entry=32, ptr=ptr@entry=0x7fad340008b0) at trace.c:770 #5 0x00007fad947b5754 in malloc_and_trace (n_bytes=32) at /home/stefanha/qemu/vl.c:2240 #6 0x00007fad93d70de1 in g_malloc (n_bytes=n_bytes@entry=32) at /tmp/buildd/glib2.0-2.32.3/./glib/gmem.c:159 #7 0x00007fad94813bce in get_trace_record (recordptr=, idx=56943) at trace/simple.c:114 #8 writeout_thread (opaque=) at trace/simple.c:189 #9 0x00007fad93d8ddf5 in g_thread_proxy (data=0x7fad96738800) at /tmp/buildd/glib2.0-2.32.3/./glib/gthread.c:801 #10 0x00007fad90ed7b50 in start_thread (arg=) at pthread_create.c:304 #11 0x00007fad90c226dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #12 0x0000000000000000 in ?? () Stefan