Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810739/?format=api
{ "id": 810739, "url": "http://patchwork.ozlabs.org/api/patches/810739/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150471977282.24907.9071837694091118220.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": "<150471977282.24907.9071837694091118220.stgit@frigg.lan>", "list_archive_url": null, "date": "2017-09-06T17:42:53", "name": "[v4,05/20] instrument: [bsd-user] Add command line library loader", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "fd2677ddb9b653fbc04494bdaf6350d569f4dfa1", "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/150471977282.24907.9071837694091118220.stgit@frigg.lan/mbox/", "series": [ { "id": 1859, "url": "http://patchwork.ozlabs.org/api/series/1859/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1859", "date": "2017-09-06T17:22:41", "name": "instrument: Add basic event instrumentation", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/1859/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810739/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810739/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 3xnWCQ55GRz9t2d\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Sep 2017 03:43:30 +1000 (AEST)", "from localhost ([::1]:37310 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 1dpeMK-0006IG-Sv\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 13:43:28 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:40119)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dpeLz-0006Gg-KB\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 13:43:08 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dpeLw-0001X8-IW\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 13:43:07 -0400", "from roura.ac.upc.es ([147.83.33.10]:58762)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dpeLw-0001Wh-7E\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 13:43:04 -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 v86Hh0s5004203;\n\tWed, 6 Sep 2017 19:43:00 +0200", "from localhost (unknown [31.210.187.58])\n\tby correu-2.ac.upc.es (Postfix) with ESMTPSA id C0B02323;\n\tWed, 6 Sep 2017 19:42:54 +0200 (CEST)" ], "From": "=?utf-8?b?TGx1w61z?= Vilanova <vilanova@ac.upc.edu>", "To": "qemu-devel@nongnu.org", "Date": "Wed, 6 Sep 2017 20:42:53 +0300", "Message-Id": "<150471977282.24907.9071837694091118220.stgit@frigg.lan>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<150471856141.24907.274176769201097378.stgit@frigg.lan>", "References": "<150471856141.24907.274176769201097378.stgit@frigg.lan>", "User-Agent": "StGit/0.17.1-dirty", "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\tv86Hh0s5004203", "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 v4 05/20] 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>, Stefan 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 | 15 +++++++++++++++\n bsd-user/syscall.c | 5 +++++\n 2 files changed, 20 insertions(+)", "diff": "diff --git a/bsd-user/main.c b/bsd-user/main.c\nindex 8a6706a1c8..2cf75290cd 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,7 @@ int main(int argc, char **argv)\n cpu_model = NULL;\n \n qemu_add_opts(&qemu_trace_opts);\n+ qemu_add_opts(&qemu_instr_opts);\n \n optind = 1;\n for (;;) {\n@@ -843,6 +853,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 +885,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": [ "v4", "05/20" ] }