Show a patch.

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

{
    "id": 17990,
    "url": "https://patchwork.libcamera.org/api/patches/17990/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17990/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20221213091558.621950-8-paul.elder@ideasonboard.com>",
    "date": "2022-12-13T09:15:58",
    "name": "[libcamera-devel,v2,7/7] tracepoints: pipeline: Add tracepoint for bufferReady",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e7fc8da2dd731849688f05343f4e62295a68cc88",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17990/mbox/",
    "series": [
        {
            "id": 3668,
            "url": "https://patchwork.libcamera.org/api/series/3668/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3668",
            "date": "2022-12-13T09:15:51",
            "name": "tracepoints: request: Improve request tracepoints",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3668/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17990/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17990/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 64266C328D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Dec 2022 09:16:24 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 20F566336F;\n\tTue, 13 Dec 2022 10:16:24 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 726A66336F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Dec 2022 10:16:22 +0100 (CET)",
            "from pyrite.tail37cf.ts.net (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A61B4A7;\n\tTue, 13 Dec 2022 10:16:20 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670922984;\n\tbh=uLbS2MMYkwciYvkiMPsKpj+TkPQQbhGuKbcAlM5zBuk=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=qAKHkYtgfTuQxxZXIScUmNhxctTmp9HWmvxcM0W9eItbmmXe+pr5o1tLyCpSIducF\n\t+314kLIczVRn9tHYrGG7wiAt6MkDb8cRt1ddMzE0zcw3HYUufrgSi/tZ9frstT6SDY\n\t9BQq5NraiNHPjMEbjhPanDYnKQtWAD73J2kHTN5/I3gua4PXAUkWc0HNShZ5UWZcLt\n\tOGGoFX8n479qM2givNtkNz9re5MpqJoSofJilytaCH/MxyaBHheoaktOzUCzuSele7\n\tu1W7yZogbK3tm/1LwipClzc5QrhlR2fu6OxV+lIEEOfJOd58daDX9YmdDJKViJcXeQ\n\tajYTajIEk57gA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1670922982;\n\tbh=uLbS2MMYkwciYvkiMPsKpj+TkPQQbhGuKbcAlM5zBuk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kTevQmILo9vAv/6K8XnddfE4qQp26T9c8OQIfCnkP5QVn4wftVS+R4KWeUza20OOu\n\tEHMtFSl4S7xljNID+owfQDW3LzQfq2Mjg6yAIlOISP6b2S2KJG13xI2XoYcGHcp6pn\n\tgzcr+i/224R7W8Nv5/oe/Wqh1T/SlTDVFi0luQwA="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"kTevQmIL\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 13 Dec 2022 18:15:58 +0900",
        "Message-Id": "<20221213091558.621950-8-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20221213091558.621950-1-paul.elder@ideasonboard.com>",
        "References": "<20221213091558.621950-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 7/7] tracepoints: pipeline: Add\n\ttracepoint for bufferReady",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Paul Elder <paul.elder@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a tracepoint to track bufferReady. Only the Request address is\nprinted and not Request information, to prevent dereferencing a\npotentially nullptr request.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nNew in v2\n---\n .../libcamera/internal/tracepoints/pipeline.tp | 18 ++++++++++++++++++\n src/libcamera/pipeline/vimc/vimc.cpp           |  3 +++\n 2 files changed, 21 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/tracepoints/pipeline.tp b/include/libcamera/internal/tracepoints/pipeline.tp\nindex 71694dd4..c623683a 100644\n--- a/include/libcamera/internal/tracepoints/pipeline.tp\n+++ b/include/libcamera/internal/tracepoints/pipeline.tp\n@@ -5,6 +5,9 @@\n  * pipeline.tp - Tracepoints for pipelines\n  */\n \n+#include <libcamera/framebuffer.h>\n+#include <libcamera/request.h>\n+\n #include \"libcamera/internal/pipeline_handler.h\"\n \n TRACEPOINT_EVENT(\n@@ -43,3 +46,18 @@ TRACEPOINT_EVENT(\n \t\tctf_string(name, pipe->name())\n \t)\n )\n+\n+TRACEPOINT_EVENT(\n+\tlibcamera,\n+\tpipe_buffer_ready,\n+\tTP_ARGS(\n+\t\tlibcamera::PipelineHandler *, pipe,\n+\t\tlibcamera::FrameBuffer *, buf,\n+\t\tlibcamera::Request *, req\n+\t),\n+\tTP_FIELDS(\n+\t\tctf_integer_hex(uintptr_t, buffer, reinterpret_cast<uintptr_t>(buf))\n+\t\tctf_enum(libcamera, buffer_status, uint32_t, buf_status, buf->metadata().status)\n+\t\tctf_integer_hex(uintptr_t, request, reinterpret_cast<uintptr_t>(req))\n+\t)\n+)\ndiff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 204f5ad7..79c401e7 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -36,6 +36,7 @@\n #include \"libcamera/internal/ipa_manager.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n+#include \"libcamera/internal/tracepoints.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n@@ -577,6 +578,8 @@ int VimcCameraData::init()\n \n void VimcCameraData::bufferReady(FrameBuffer *buffer)\n {\n+\tLIBCAMERA_TRACEPOINT(pipe_buffer_ready, this->pipe(), buffer, buffer->request());\n+\n \tPipelineHandlerVimc *pipe =\n \t\tstatic_cast<PipelineHandlerVimc *>(this->pipe());\n \tRequest *request = buffer->request();\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "7/7"
    ]
}