From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs4iz-0002am-7Y for qemu-devel@nongnu.org; Thu, 06 Oct 2016 05:12:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bs4iu-0001Tw-NR for qemu-devel@nongnu.org; Thu, 06 Oct 2016 05:12:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bs4iu-0001Tp-EU for qemu-devel@nongnu.org; Thu, 06 Oct 2016 05:12:16 -0400 Date: Thu, 6 Oct 2016 10:12:10 +0100 From: "Daniel P. Berrange" Message-ID: <20161006091210.GE14680@redhat.com> Reply-To: "Daniel P. Berrange" References: <1475588159-30598-1-git-send-email-berrange@redhat.com> <20161005153127.GA30075@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161005153127.GA30075@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [PATCH v6 00/20] Refactor trace to allow modular build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, =?utf-8?B?TGx1w61z?= Vilanova On Wed, Oct 05, 2016 at 04:31:27PM +0100, Stefan Hajnoczi wrote: > Hmm...the SystemTap simpletrace script does not work anymore for me. But I've > tested qemu.git/master and get the same results. > > Did you test it successfully somehow? > > $ cat x86_64-softmmu/qemu-system-x86_64.stp \ > x86_64-softmmu/qemu-system-x86_64-simpletrace.stp >test.stp > $ echo 'probe qemu.system.x86_64.simpletrace.* {}' >>test.stp > > $ sudo stap test.stp -c 'x86_64-softmmu/qemu-system-x86_64 -enable-kvm' >/tmp/trace.dat Do you have pre-existing files for QEMU simpletrace in /usr/share/systemtap/tapset when you ran this ? If so this is what is causing you trouble. Systemtap will match on name, and will thus find multiple copies of the QME probes - one set in your test.stp and the other set in /usr/share/systemtap/tapset/qemu-system-x86_64-simpletrace.stp and activate both of them. Since my series changed the data format, this will cause problems as you'll get probes writing new & old formats in the same file > > $ scripts/simpletrace.py trace-events-all /tmp/trace.dat > Traceback (most recent call last): > File "scripts/simpletrace.py", line 217, in > run(Formatter()) > File "scripts/simpletrace.py", line 192, in run > process(events, sys.argv[2], analyzer, read_header=read_header) > File "scripts/simpletrace.py", line 167, in process > for rec in read_trace_records(edict, log): > File "scripts/simpletrace.py", line 103, in read_trace_records > rec = read_record(edict, idtoname, fobj) > File "scripts/simpletrace.py", line 71, in read_record > return get_record(edict, idtoname, rechdr, fobj) > File "scripts/simpletrace.py", line 43, in get_record > name = idtoname[event_id] > KeyError: 1475680158726993795 > > $ scripts/simpletrace.py --no-header trace-events-all /tmp/trace.dat > Traceback (most recent call last): > File "scripts/simpletrace.py", line 217, in > run(Formatter()) > File "scripts/simpletrace.py", line 192, in run > process(events, sys.argv[2], analyzer, read_header=read_header) > File "scripts/simpletrace.py", line 167, in process > for rec in read_trace_records(edict, log): > File "scripts/simpletrace.py", line 103, in read_trace_records > rec = read_record(edict, idtoname, fobj) > File "scripts/simpletrace.py", line 71, in read_record > return get_record(edict, idtoname, rechdr, fobj) > File "scripts/simpletrace.py", line 43, in get_record > name = idtoname[event_id] > KeyError: 17487890541996943796L Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|