Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/812167/?format=api
{ "id": 812167, "url": "http://patchwork.ozlabs.org/api/patches/812167/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150506156146.19604.7064966029596517363.stgit@frigg.lan/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "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": "<150506156146.19604.7064966029596517363.stgit@frigg.lan>", "list_archive_url": null, "date": "2017-09-10T16:39:21", "name": "[7/7] trace: Add event \"guest_inst_info_after\"", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3f5cac7638c292391a99be57065811902519dbdf", "submitter": { "id": 9099, "url": "http://patchwork.ozlabs.org/api/people/9099/?format=api", "name": "Lluís Vilanova", "email": "vilanova@ac.upc.edu" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150506156146.19604.7064966029596517363.stgit@frigg.lan/mbox/", "series": [ { "id": 2406, "url": "http://patchwork.ozlabs.org/api/series/2406/?format=api", "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/812167/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812167/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 3xqxcB75jvz9s0Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 02:39:54 +1000 (AEST)", "from localhost ([::1]:53602 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 1dr5Gz-0003I0-5D\n\tfor incoming@patchwork.ozlabs.org; Sun, 10 Sep 2017 12:39:53 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:44825)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr5Ge-0003Hd-Ma\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:39:33 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr5Gb-0000gP-K9\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:39:32 -0400", "from roura.ac.upc.es ([147.83.33.10]:55976)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dr5Gb-0000g9-9G\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:39:29 -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 v8AGdSvJ020703;\n\tSun, 10 Sep 2017 18:39:28 +0200", "from localhost (unknown [132.68.137.153])\n\tby correu-2.ac.upc.es (Postfix) with ESMTPSA id ACAEB1683;\n\tSun, 10 Sep 2017 18:39:22 +0200 (CEST)" ], "From": "=?utf-8?b?TGx1w61z?= Vilanova <vilanova@ac.upc.edu>", "To": "qemu-devel@nongnu.org", "Date": "Sun, 10 Sep 2017 19:39:21 +0300", "Message-Id": "<150506156146.19604.7064966029596517363.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\tv8AGdSvJ020703", "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 7/7] trace: Add event \"guest_inst_info_after\"", "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 | 18 ++++++++++++++----\n trace-events | 8 ++++++++\n 2 files changed, 22 insertions(+), 4 deletions(-)", "diff": "diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c\nindex c010aeee45..d3039e7fd2 100644\n--- a/accel/tcg/translator.c\n+++ b/accel/tcg/translator.c\n@@ -36,6 +36,7 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n CPUState *cpu, TranslationBlock *tb)\n {\n target_ulong pc_bbl, pc_insn = 0;\n+ unsigned int insn_size = 0;\n bool translated_insn = false;\n int max_insns;\n \n@@ -82,6 +83,8 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n /* Tracing after (previous instruction) */\n if (db->num_insns > 0) {\n trace_guest_inst_after_tcg(cpu, tcg_ctx.tcg_env, pc_insn);\n+ trace_guest_inst_info_after_tcg(\n+ cpu, tcg_ctx.tcg_env, pc_insn, insn_size);\n }\n pc_insn = db->pc_next;\n \n@@ -145,7 +148,7 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n translated_insn = true;\n /* Tracing after (patched values) */\n if (TRACE_GUEST_INST_INFO_BEFORE_EXEC_ENABLED) {\n- unsigned int insn_size = db->pc_next - pc_insn;\n+ insn_size = db->pc_next - pc_insn;\n tcg_set_insn_param(insn_size_opcode_idx, 1, insn_size);\n }\n \n@@ -164,7 +167,8 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n \n /* Tracing after */\n if (TRACE_GUEST_BBL_AFTER_ENABLED ||\n- TRACE_GUEST_INST_AFTER_ENABLED) {\n+ TRACE_GUEST_INST_AFTER_ENABLED ||\n+ TRACE_GUEST_INST_INFO_AFTER_ENABLED) {\n tcg_ctx.disas.in_guest_code = false;\n if (tcg_ctx.disas.inline_label == NULL) {\n tcg_ctx.disas.inline_label = gen_new_inline_label();\n@@ -175,6 +179,10 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,\n if (TRACE_GUEST_INST_AFTER_ENABLED && translated_insn) {\n trace_guest_inst_after_tcg(cpu, tcg_ctx.tcg_env, pc_insn);\n }\n+ if (TRACE_GUEST_INST_INFO_AFTER_ENABLED && translated_insn) {\n+ trace_guest_inst_info_after_tcg(\n+ cpu, tcg_ctx.tcg_env, pc_insn, insn_size);\n+ }\n if (TRACE_GUEST_BBL_AFTER_ENABLED) {\n trace_guest_bbl_after_tcg(cpu, tcg_ctx.tcg_env, pc_bbl);\n }\n@@ -207,7 +215,8 @@ void translator__gen_goto_tb(TCGContext *ctx)\n {\n if (ctx->disas.in_guest_code &&\n (TRACE_GUEST_BBL_AFTER_ENABLED ||\n- TRACE_GUEST_INST_AFTER_ENABLED)) {\n+ TRACE_GUEST_INST_AFTER_ENABLED ||\n+ TRACE_GUEST_INST_INFO_AFTER_ENABLED)) {\n if (ctx->disas.inline_label == NULL) {\n ctx->disas.inline_label = gen_new_inline_label();\n }\n@@ -221,7 +230,8 @@ void translator__gen_exit_tb(TCGContext *ctx)\n {\n if (ctx->disas.in_guest_code && !ctx->disas.seen_goto_tb &&\n (TRACE_GUEST_BBL_AFTER_ENABLED ||\n- TRACE_GUEST_INST_AFTER_ENABLED)) {\n+ TRACE_GUEST_INST_AFTER_ENABLED ||\n+ TRACE_GUEST_INST_INFO_AFTER_ENABLED)) {\n if (ctx->disas.inline_label == NULL) {\n ctx->disas.inline_label = gen_new_inline_label();\n }\ndiff --git a/trace-events b/trace-events\nindex c477302d8d..73d797cb48 100644\n--- a/trace-events\n+++ b/trace-events\n@@ -135,6 +135,14 @@ vcpu tcg guest_inst_after(uint64_t vaddr) \"vaddr=0x%016\"PRIx64, \"vaddr=0x%016\"PR\n # Targets: TCG(all)\n disable vcpu tcg guest_inst_info_before(uint64_t vaddr, TCGv_i32 size) \"vaddr=0x%016\"PRIx64, \"vaddr=0x%016\"PRIx64\" size=%d\"\n \n+# @vaddr: Instruction's virtual address\n+# @size: Instruction's size in bytes\n+#\n+# Same as 'guest_inst_after', with additional information.\n+#\n+# Targets: TCG(all)\n+disable vcpu tcg guest_inst_info_after(uint64_t vaddr, uint32_t size) \"vaddr=0x%016\"PRIx64\" size=%d\", \"vaddr=0x%016\"PRIx64\" size=%d\"\n+\n # @vaddr: Access' virtual address.\n # @info : Access' information (see below).\n #\n", "prefixes": [ "7/7" ] }