From patchwork Wed Jun 15 14:20:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 16220 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 295E7BD808 for ; Wed, 15 Jun 2022 14:21:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 47DDA65635; Wed, 15 Jun 2022 16:21:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1655302863; bh=jFgCnY8jeI+FwmTF0ooh1ej24NJt6A9iJrKPYfFsaNo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=XInysmI7s+NfcQFZducvqxkgWGlvufrJdo0XLkesf3/tbb8nfhSQDK1JCpbSlh47h W8p95gLfZeCgoab5oLVhzyPxlz+lvZG4Ub3/IDXyY9gcbkED5BMMFPCEYbRUewzBOZ 1asaUSKg5zPMD6GVUW3dnfEN+d40dfHuPjlqQIBor9E5a4NxZtdK82S+VzI92yUpbF 8o4fqqolgenc7AwHA8oj9k8ErNQnaKS9I7mcBOcPhlVobXwDYTbVlrAvJcjY1lJhmO qKwK2iUAaWe36P3V7SdF/2xxOINuXeBrRdSqytKvvat4QdwZVXymNbBn50vUa7wvvJ ORaJKor4Lz69A== Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 34B446559A for ; Wed, 15 Jun 2022 16:21:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eOlYJWsu"; dkim-atps=neutral Received: by mail-pf1-x430.google.com with SMTP id u37so3171519pfg.3 for ; Wed, 15 Jun 2022 07:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=US7DuusiKS6UgNYev71zT19JB89w/GElshcVR3zuu84=; b=eOlYJWsu5xbl3k7l12Gpd6KKRW9kA9dMFjt6Isd4GpUxKcjmEhi2UgpBJwscVKyB0R tXtK/z5HUabVKosqVsPvUrzFBi6fphI0RcYo+OoTIBmclc3QAZtvf5179ODlapqXQISe Y7k+i06ANIHUdG64WVR4NnWSBPnMid7GcRF8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=US7DuusiKS6UgNYev71zT19JB89w/GElshcVR3zuu84=; b=BelO7LvzZNqvxTW8HVZ9Es1Y08XK2AOkOcgOhHWcIzfmFhwxLCRbHM2XuLStI5Nzhd 2O12x6fp0JA3g1St1h1pWNXdgV42bT5lwqrc+ckRVlOEBGey0SFpED+O3ClNsdoeUYEN njfpB2mE/5a8meg6A6eRa4HYDMJeG2EGixaem2romG69Yuin3xfWeK2++NfsBl8HfJFT ARVCAOmo8OrkolwLpe50t7T/YpypiluFSr3qI/KQJPHMkJh7Ac8NCXjE8OWp7WWeMk40 tY7ZR1CYJEH4//LjRAJTS+5RCu47AAIMKKIKn4iYqYg6jnK+UM9aFqoGGSD84YMLf9kp rMxg== X-Gm-Message-State: AOAM532AUPia6+QyNlTKNYRZPz2ZjvYaDZVVCeyAthaSqgwASouB98AV k5Ywbs1wxFqX8DwsOvSfNKD7U4VLXETOhw== X-Google-Smtp-Source: ABdhPJzxaqYAYreR/QxBfPgwTZQhYew2wOiJxLsc4VVWX8orzSdKRp1oHTue5oQ0wOjzjFlrlnH0ag== X-Received: by 2002:a05:6a00:4211:b0:51c:45e:532b with SMTP id cd17-20020a056a00421100b0051c045e532bmr10264167pfb.10.1655302860040; Wed, 15 Jun 2022 07:21:00 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (21.160.199.104.bc.googleusercontent.com. [104.199.160.21]) by smtp.gmail.com with ESMTPSA id g1-20020a17090adac100b001e67e01158fsm1840882pjx.30.2022.06.15.07.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 07:20:59 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Jun 2022 14:20:50 +0000 Message-Id: <20220615142051.450396-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/1] Use tracing with perfetto in ChromeOS X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Cheng-Hao Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello everyone, This is the first draft of the patch(es) that uses tracing with perfetto instead of lttng when libcamera is used in ChromeOS, which already uses perfetto to collect traces in most of the applications/services. Please take a look and see if it's the right direction to go. Mostly I copied and pasted the simple producer in chromiumos (also written by me :) ): https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/perfetto_simple_producer Thanks! BR, Harvey Harvey Yang (1): Use tracing with perfetto in ChromeOS include/libcamera/internal/tracepoints.h.in | 37 +++++++++-- .../internal/tracepoints/meson.build | 25 ++++--- .../internal/tracepoints/pipeline.perfetto | 10 +++ .../internal/tracepoints/request.perfetto | 30 +++++++++ meson.build | 1 + src/android/cros/camera3_hal.cpp | 5 ++ src/android/cros/meson.build | 1 + src/libcamera/meson.build | 18 ++++- src/libcamera/pipeline_perfetto.cpp | 22 +++++++ src/libcamera/request_perfetto.cpp | 65 +++++++++++++++++++ src/libcamera/tracepoints.cpp | 11 ++++ 11 files changed, 209 insertions(+), 16 deletions(-) create mode 100644 include/libcamera/internal/tracepoints/pipeline.perfetto create mode 100644 include/libcamera/internal/tracepoints/request.perfetto create mode 100644 src/libcamera/pipeline_perfetto.cpp create mode 100644 src/libcamera/request_perfetto.cpp