get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/816827/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 816827,
    "url": "http://patchwork.ozlabs.org/api/patches/816827/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170921120751.3027-2-pbonzini@redhat.com/",
    "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": "<20170921120751.3027-2-pbonzini@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-21T12:07:49",
    "name": "[1/3] memory: trace FlatView creation and destruction",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "51f3fc2b10b76c51278086825c1a34566420d86c",
    "submitter": {
        "id": 2701,
        "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api",
        "name": "Paolo Bonzini",
        "email": "pbonzini@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170921120751.3027-2-pbonzini@redhat.com/mbox/",
    "series": [
        {
            "id": 4365,
            "url": "http://patchwork.ozlabs.org/api/series/4365/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=4365",
            "date": "2017-09-21T12:07:49",
            "name": "FlatView memory savings",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4365/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816827/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816827/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>)",
            "ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pbonzini@redhat.com"
        ],
        "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 3xyb4G2nGyz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 22:08:46 +1000 (AEST)",
            "from localhost ([::1]:53377 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 1dv0Hc-0002Ij-D3\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 08:08:44 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:39281)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1dv0Gt-0002H9-G9\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 08:08:00 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1dv0Gp-00023t-CH\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 08:07:59 -0400",
            "from mx1.redhat.com ([209.132.183.28]:35686)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>) id 1dv0Gp-000225-5o\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 08:07:55 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 556107E426;\n\tThu, 21 Sep 2017 12:07:54 +0000 (UTC)",
            "from donizetti.redhat.com (ovpn-117-52.ams2.redhat.com\n\t[10.36.117.52])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8DF9D5EDF2;\n\tThu, 21 Sep 2017 12:07:53 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 556107E426",
        "From": "Paolo Bonzini <pbonzini@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Thu, 21 Sep 2017 14:07:49 +0200",
        "Message-Id": "<20170921120751.3027-2-pbonzini@redhat.com>",
        "In-Reply-To": "<20170921120751.3027-1-pbonzini@redhat.com>",
        "References": "<20170921120751.3027-1-pbonzini@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tThu, 21 Sep 2017 12:07:54 +0000 (UTC)",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PATCH 1/3] memory: trace FlatView creation and\n\tdestruction",
        "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": "aik@ozlabs.ru",
        "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: Paolo Bonzini <pbonzini@redhat.com>\n---\n include/exec/memory.h   | 1 -\n include/qemu/typedefs.h | 1 +\n memory.c                | 3 +++\n trace-events            | 3 +++\n 4 files changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/exec/memory.h b/include/exec/memory.h\nindex 402824c6f2..5ed4042f87 100644\n--- a/include/exec/memory.h\n+++ b/include/exec/memory.h\n@@ -48,7 +48,6 @@\n \n typedef struct MemoryRegionOps MemoryRegionOps;\n typedef struct MemoryRegionMmio MemoryRegionMmio;\n-typedef struct FlatView FlatView;\n \n struct MemoryRegionMmio {\n     CPUReadMemoryFunc *read[3];\ndiff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h\nindex 163550214c..980d2b330e 100644\n--- a/include/qemu/typedefs.h\n+++ b/include/qemu/typedefs.h\n@@ -30,6 +30,7 @@ typedef struct DisplaySurface DisplaySurface;\n typedef struct DriveInfo DriveInfo;\n typedef struct Error Error;\n typedef struct EventNotifier EventNotifier;\n+typedef struct FlatView FlatView;\n typedef struct FWCfgEntry FWCfgEntry;\n typedef struct FWCfgIoState FWCfgIoState;\n typedef struct FWCfgMemState FWCfgMemState;\ndiff --git a/memory.c b/memory.c\nindex a26adca4d3..4952cc5d84 100644\n--- a/memory.c\n+++ b/memory.c\n@@ -270,6 +270,7 @@ static FlatView *flatview_new(MemoryRegion *mr_root)\n     view->ref = 1;\n     view->root = mr_root;\n     memory_region_ref(mr_root);\n+    trace_flatview_new(view, mr_root);\n \n     return view;\n }\n@@ -295,6 +296,7 @@ static void flatview_destroy(FlatView *view)\n {\n     int i;\n \n+    trace_flatview_destroy(view, view->root);\n     if (view->dispatch) {\n         address_space_dispatch_free(view->dispatch);\n     }\ndiff --git a/trace-events b/trace-events\nindex 1f50f56d9d..1d2eb5d3e4 100644\n--- a/trace-events\n+++ b/trace-events\n@@ -64,6 +64,8 @@ memory_region_tb_read(int cpu_index, uint64_t addr, uint64_t value, unsigned siz\n memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned size) \"cpu %d addr 0x%\"PRIx64\" value 0x%\"PRIx64\" size %u\"\n memory_region_ram_device_read(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) \"cpu %d mr %p addr 0x%\"PRIx64\" value 0x%\"PRIx64\" size %u\"\n memory_region_ram_device_write(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size) \"cpu %d mr %p addr 0x%\"PRIx64\" value 0x%\"PRIx64\" size %u\"\n+flatview_new(FlatView *view, MemoryRegion *root) \"%p (root %p)\"\n+flatview_destroy(FlatView *view, MemoryRegion *root) \"%p (root %p)\"\n \n ### Guest events, keep at bottom\n \n",
    "prefixes": [
        "1/3"
    ]
}