{"id":14029,"url":"https://patchwork.libcamera.org/api/1.1/covers/14029/?format=json","web_url":"https://patchwork.libcamera.org/cover/14029/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211003223606.20016-1-laurent.pinchart@ideasonboard.com>","date":"2021-10-03T22:36:02","name":"[libcamera-devel,v2,0/4] libcamera: Improve backtraces","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/14029/mbox/","series":[{"id":2593,"url":"https://patchwork.libcamera.org/api/1.1/series/2593/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2593","date":"2021-10-03T22:36:03","name":"libcamera: Improve backtraces","version":2,"mbox":"https://patchwork.libcamera.org/series/2593/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/14029/comments/","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 E1AC5C3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  3 Oct 2021 22:36:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D71B9691C5;\n\tMon,  4 Oct 2021 00:36:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D19D6691A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Oct 2021 00:36:14 +0200 (CEST)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 47002A2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Oct 2021 00:36:14 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Pq7w01En\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633300574;\n\tbh=d/gdooZVxOD8zhka53RlTdtP30bihU76kBaKh5L4VBg=;\n\th=From:To:Subject:Date:From;\n\tb=Pq7w01EnHJ/ajWVyZamB/wbNKs70/0+C7AyakLo7oEDyB4bmyiMTMlLQWatpUn//g\n\tIn64JnBz6/aKRRnGxewLR2PsPe/oIls2h/sjLS9p68oCRrXuYcJq9LX41rOQGh6fDX\n\tPmOAWbE2X3P4LBziE6GzB1Iz8TMhBJfwLXhN8/aU=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon,  4 Oct 2021 01:36:02 +0300","Message-Id":"<20211003223606.20016-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 0/4] libcamera: Improve backtraces","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello,\n\nThis patch series improves backtrace generation. It stems from an effort\nto implement a FileDescriptor leak tracker, and I'm posting it\nseparately because it's useful on its own.\n\nPatch 1/4 extracts the backtrace generation code from the logger to a\nnew Backtrace class. The class allows capturing a backtrace (in a way\nthat is as lightweight as possible), and later formatting it in a\nhuman-readable form (which can be more expensive). Backtrace instances\ncan thus be created relatively frequently and stored for possible later\nusage.\n\nPatches 2/4 to 4/4 then improve the Backtrace class to use libdw and/or\nlibunwind when available. libunwind provides both backtrace capture and\nbacktrace formatting capabilities, while libdw provides the latter only,\nbut with support for more detailed information. In both cases C++ symbol\nnames can now be demangled.\n\nlibdw and libunwind are optional dependencies, they will be used\nautomatically if found.\n\nChanges compared to v1 are minor and listed in individual changelogs.\n\nLaurent Pinchart (4):\n  libcamera: base: Add Backtrace class\n  libcamera: base: backtrace: Use libdw to provide symbolic names\n  libcamera: base: backtrace: Use libunwind when available\n  libcamera: base: backtrace: Fallback to libunwind for symbolic names\n\n include/libcamera/base/backtrace.h |  38 ++++\n include/libcamera/base/meson.build |   1 +\n meson.build                        |   4 -\n src/libcamera/base/backtrace.cpp   | 323 +++++++++++++++++++++++++++++\n src/libcamera/base/log.cpp         |  27 +--\n src/libcamera/base/meson.build     |  18 ++\n 6 files changed, 388 insertions(+), 23 deletions(-)\n create mode 100644 include/libcamera/base/backtrace.h\n create mode 100644 src/libcamera/base/backtrace.cpp\n\n\nbase-commit: d79b41200199e03834578f5120bb8375bad37aec"}