Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813310/?format=api
{ "id": 813310, "url": "http://patchwork.ozlabs.org/api/patches/813310/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150529763287.10902.10736733334663967708.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": "<150529763287.10902.10736733334663967708.stgit@frigg.lan>", "list_archive_url": null, "date": "2017-09-13T10:13:53", "name": "[v6,05/22] instrument: [bsd-user] Add command line library loader", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "05cc3ff8300a574560c2c0401c734835c8169207", "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/150529763287.10902.10736733334663967708.stgit@frigg.lan/mbox/", "series": [ { "id": 2857, "url": "http://patchwork.ozlabs.org/api/series/2857/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2857", "date": "2017-09-13T09:53:43", "name": "instrument: Add basic event instrumentation", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/2857/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813310/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813310/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 3xscw45TMXz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 20:14:28 +1000 (AEST)", "from localhost ([::1]:41335 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 1ds4gc-0008Ar-A7\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 06:14:26 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:43187)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4gJ-000889-PN\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:14:08 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4gF-0006bs-Kj\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:14:07 -0400", "from roura.ac.upc.es ([147.83.33.10]:59537)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4gF-0006bK-98\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:14:03 -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 v8DADx4E008276;\n\tWed, 13 Sep 2017 12:13:59 +0200", "from localhost (unknown [132.68.137.204])\n\tby correu-2.ac.upc.es (Postfix) with ESMTPSA id 2649739C;\n\tWed, 13 Sep 2017 12:13:54 +0200 (CEST)" ], "From": "=?utf-8?b?TGx1w61z?= Vilanova <vilanova@ac.upc.edu>", "To": "qemu-devel@nongnu.org", "Date": "Wed, 13 Sep 2017 13:13:53 +0300", "Message-Id": "<150529763287.10902.10736733334663967708.stgit@frigg.lan>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<150529642278.10902.18234057937634437857.stgit@frigg.lan>", "References": "<150529642278.10902.18234057937634437857.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\tv8DADx4E008276", "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 v6 05/22] instrument: [bsd-user] Add command\n\tline library loader", "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": "\"Emilio G. Cota\" <cota@braap.org>, Markus Armbruster <armbru@redhat.com>,\n\tStefan Hajnoczi <stefanha@redhat.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 bsd-user/main.c | 17 +++++++++++++++++\n bsd-user/syscall.c | 5 +++++\n 2 files changed, 22 insertions(+)", "diff": "diff --git a/bsd-user/main.c b/bsd-user/main.c\nindex 8a6706a1c8..104844edfc 100644\n--- a/bsd-user/main.c\n+++ b/bsd-user/main.c\n@@ -33,6 +33,7 @@\n #include \"exec/log.h\"\n #include \"trace/control.h\"\n #include \"glib-compat.h\"\n+#include \"instrument/cmdline.h\"\n \n int singlestep;\n unsigned long mmap_min_addr;\n@@ -667,6 +668,11 @@ static void usage(void)\n \"-B address set guest_base address to address\\n\"\n \"-bsd type select emulated BSD type FreeBSD/NetBSD/OpenBSD (default)\\n\"\n \"\\n\"\n+#if defined(CONFIG_INSTRUMENT)\n+ \"-instr [file=]<file>[,arg=<string>]\\n\"\n+ \" load an instrumentation library\\n\"\n+ \"\\n\"\n+#endif\n \"Debug options:\\n\"\n \"-d item1[,...] enable logging of specified items\\n\"\n \" (use '-d help' for a list of log items)\\n\"\n@@ -738,6 +744,9 @@ int main(int argc, char **argv)\n envlist_t *envlist = NULL;\n char *trace_file = NULL;\n bsd_type = target_openbsd;\n+ char *instrument_path = NULL;\n+ int instrument_argc = 0;\n+ const char **instrument_argv = NULL;\n \n if (argc <= 1)\n usage();\n@@ -756,6 +765,9 @@ int main(int argc, char **argv)\n cpu_model = NULL;\n \n qemu_add_opts(&qemu_trace_opts);\n+#if defined(CONFIG_INSTRUMENT)\n+ qemu_add_opts(&qemu_instr_opts);\n+#endif\n \n optind = 1;\n for (;;) {\n@@ -843,6 +855,9 @@ int main(int argc, char **argv)\n } else if (!strcmp(r, \"trace\")) {\n g_free(trace_file);\n trace_file = trace_opt_parse(optarg);\n+ } else if (!strcmp(r, \"instr\")) {\n+ instr_opt_parse(optarg, &instrument_path,\n+ &instrument_argc, &instrument_argv);\n } else {\n usage();\n }\n@@ -872,6 +887,8 @@ int main(int argc, char **argv)\n }\n trace_init_file(trace_file);\n \n+ instr_init(instrument_path, instrument_argc, instrument_argv);\n+\n /* Zero out regs */\n memset(regs, 0, sizeof(struct target_pt_regs));\n \ndiff --git a/bsd-user/syscall.c b/bsd-user/syscall.c\nindex 66492aaf5d..3230f722f3 100644\n--- a/bsd-user/syscall.c\n+++ b/bsd-user/syscall.c\n@@ -26,6 +26,8 @@\n \n #include \"qemu.h\"\n #include \"qemu-common.h\"\n+#include \"instrument/cmdline.h\"\n+\n \n //#define DEBUG\n \n@@ -332,6 +334,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,\n _mcleanup();\n #endif\n gdb_exit(cpu_env, arg1);\n+ instr_fini();\n /* XXX: should free thread stack and CPU env */\n _exit(arg1);\n ret = 0; /* avoid warning */\n@@ -430,6 +433,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,\n _mcleanup();\n #endif\n gdb_exit(cpu_env, arg1);\n+ instr_fini();\n /* XXX: should free thread stack and CPU env */\n _exit(arg1);\n ret = 0; /* avoid warning */\n@@ -505,6 +509,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,\n _mcleanup();\n #endif\n gdb_exit(cpu_env, arg1);\n+ instr_fini();\n /* XXX: should free thread stack and CPU env */\n _exit(arg1);\n ret = 0; /* avoid warning */\n", "prefixes": [ "v6", "05/22" ] }