{"id":812159,"url":"http://patchwork.ozlabs.org/api/patches/812159/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/150506010962.19604.7773376130922107594.stgit@frigg.lan/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<150506010962.19604.7773376130922107594.stgit@frigg.lan>","list_archive_url":null,"date":"2017-09-10T16:15:09","name":"[1/7] trace: Add event \"guest_bbl_before\"","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ecf8d37b9c0bbdc04dd4a88ce18676930d017b88","submitter":{"id":9099,"url":"http://patchwork.ozlabs.org/api/people/9099/?format=json","name":"Lluís Vilanova","email":"vilanova@ac.upc.edu"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/150506010962.19604.7773376130922107594.stgit@frigg.lan/mbox/","series":[{"id":2406,"url":"http://patchwork.ozlabs.org/api/series/2406/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2406","date":"2017-09-10T16:11:07","name":"trace: Add guest code events","version":1,"mbox":"http://patchwork.ozlabs.org/series/2406/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812159/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812159/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xqx4K0YVjz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 02:15:45 +1000 (AEST)","from localhost ([::1]:53543 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dr4tb-0003oH-7R\n\tfor incoming@patchwork.ozlabs.org; Sun, 10 Sep 2017 12:15:43 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39907)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr4tH-0003oA-Gx\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:15:24 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr4tC-0001Mu-ID\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:15:23 -0400","from roura.ac.upc.es ([147.83.33.10]:58499)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr4tC-0001MZ-70\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:15:18 -0400","from correu-2.ac.upc.es (correu-2.ac.upc.es [147.83.30.92])\n\tby roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v8AGFGse020250;\n\tSun, 10 Sep 2017 18:15:16 +0200","from localhost (unknown [132.68.137.153])\n\tby correu-2.ac.upc.es (Postfix) with ESMTPSA id EB440133E;\n\tSun, 10 Sep 2017 18:15:10 +0200 (CEST)"],"From":"=?utf-8?b?TGx1w61z?= Vilanova <vilanova@ac.upc.edu>","To":"qemu-devel@nongnu.org","Date":"Sun, 10 Sep 2017 19:15:09 +0300","Message-Id":"<150506010962.19604.7773376130922107594.stgit@frigg.lan>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>","User-Agent":"StGit/0.18","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by roura.ac.upc.es id\n\tv8AGFGse020250","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]","X-Received-From":"147.83.33.10","Subject":"[Qemu-devel] [PATCH 1/7] trace: Add event \"guest_bbl_before\"","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\tPeter Crosthwaite <crosthwaite.peter@gmail.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>\n---\n accel/tcg/translator.c |    6 ++++++\n trace-events           |   11 +++++++++++\n 2 files changed, 17 insertions(+)","diff":"diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c\nindex afa3af478a..91b3b0da32 100644\n--- a/accel/tcg/translator.c\n+++ b/accel/tcg/translator.c\n@@ -13,6 +13,7 @@\n #include \"cpu.h\"\n #include \"tcg/tcg.h\"\n #include \"tcg/tcg-op.h\"\n+#include \"trace-tcg.h\"\n #include \"exec/exec-all.h\"\n #include \"exec/gen-icount.h\"\n #include \"exec/log.h\"\n@@ -91,6 +92,11 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n             }\n         }\n \n+        /* Tracing before */\n+        if (db->num_insns == 1) {\n+            trace_guest_bbl_before_tcg(cpu, tcg_ctx.tcg_env, db->pc_first);\n+        }\n+\n         /* Disassemble one instruction.  The translate_insn hook should\n            update db->pc_next and db->is_jmp to indicate what should be\n            done next -- either exiting this loop or locate the start of\ndiff --git a/trace-events b/trace-events\nindex 1f50f56d9d..d242f54254 100644\n--- a/trace-events\n+++ b/trace-events\n@@ -88,6 +88,17 @@ vcpu guest_cpu_exit(void)\n # Targets: all\n vcpu guest_cpu_reset(void)\n \n+\n+## Guest code\n+\n+# @vaddr: BBL's starting virtual address\n+#\n+# Mark start of BBL execution (before anything gets really executed).\n+#\n+# Mode: user, softmmu\n+# Targets: TCG(all)\n+vcpu tcg guest_bbl_before(uint64_t vaddr) \"vaddr=0x%016\"PRIx64, \"vaddr=0x%016\"PRIx64\n+\n # @vaddr: Access' virtual address.\n # @info : Access' information (see below).\n #\n","prefixes":["1/7"]}