Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1597081lqo; Sat, 18 May 2024 09:53:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV61xjfiD/lR0THawaNAv5IOmx5Oke2UNrwZ+HzcM9oouLxihZjfC/tVnvkHzD4ZaztC6QGexjLAaEOvB16ZKz7LfepqNepCuECJcCBKg== X-Google-Smtp-Source: AGHT+IEToXPmUE6YH4bjb/qo0cSa/EQhBrFcwHYQHlKOVxkSb58W2zYsFNyJ5M7RubAs2aIvP5fQ X-Received: by 2002:a17:90a:9601:b0:2ac:9baf:25b5 with SMTP id 98e67ed59e1d1-2b6cc76f70emr21667944a91.25.1716051235784; Sat, 18 May 2024 09:53:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716051235; cv=pass; d=google.com; s=arc-20160816; b=pa4L7DEZMPMSVlwoiuhSWGUDV4bHB2rh+Y5S7lSOL5W4Bf4ku47BRMXGPlCJS4VGkE Up/5v8ZS24E/6hO8R1RJTcBsUV6nBGv24Zb67QjW5GzznaPKstscyHs8rPLbZO4WlItY Jswo2swt4la2usKKI+bxFWoy8Rhu5dziQ/H0ruuWK5XTVP01gxzvr5ZkFGatLowXMRa9 0qtw5BlLdiUGKGtQfC7ddrHPvlVzT5ROQVE87NDBwmhSaxtAOwyUonTypFx4G6GLpdCR YI7BTtoGGDe51VuQBSMN4T3B5HyCWP9TsfSf0tTPbTrNpAX+Ue1JkTmlhODZJHQWULZM VmQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=n5I7/cV4Teng9SNAxB7Q/fNg2l8k9eQi6VqzuWVRqv8=; fh=8Dp3ivYg+9VSzX82CAo/csUaRWpF7DDsFuydkCUXwWw=; b=wJiOYTJqBRKDfo176CpMuc6ipxkDQI66lx+PLjFGKBQdMQFea3fqsAXzysq5QVraQu hsl42L+JxHiXijQj+qJWw8Yo1Q2hcne1Q67yJ34HPCMWl7oTSz4yTyS6VhKFwKImTGXP HXqXBNNgNKK6eoarvB5SV2VB0vfD59eG3GaWy7BCIjlkjqCsZcbKlMnlJO75EFAz4+5A dyOddrrzvzJCnWGfhzg9YiADtSqW65mhJlTH2cla78vbVH1+SWo+F3PNYefKz5I0vYSs BV9GCUxG9gDKncUVRqZVg/zCYr3O/rzb5WitFmRp4evHU6fKTkycpTbEkPWtuP6Xq7Rr qt3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=thZ+Gqhk; arc=pass (i=1 spf=pass spfdomain=flex--sesse.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-182914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea7a85si22122351a91.117.2024.05.18.09.53.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 09:53:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=thZ+Gqhk; arc=pass (i=1 spf=pass spfdomain=flex--sesse.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-182914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BDB46B2196C for ; Sat, 18 May 2024 16:53:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8AA043AA4; Sat, 18 May 2024 16:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="thZ+Gqhk" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA6C745028 for ; Sat, 18 May 2024 16:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716051223; cv=none; b=nKGlVuhk8mDBPKaWN57QkFig7C/Kl2rH4T371+a4w6f5+83ASeYuyr/yrpAhHuUG3Osdn7I5jNGooRFNbsNCRFrlwHk8GQHiirgllipRhpRJlSb55TfjJAWTf5FcK6UDDfcYvG0ulCBXI6zzTZcqnt72PuSLPh3at6Hwgq08fAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716051223; c=relaxed/simple; bh=m2ZNPiIbQkuLdaL5j3L2TRfudN5GdG9BeyxswOM/0LI=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=noRSSn2CzKRAyCrhNun6XAo5DaB7gEHrhaI1NAJqWirYAkGza0N4CjJtG4Hz31ikLxNTVJkcBohExRJdLZCvDFatEeMTrDBPsZe3OOGaZyC/xTntf388YU8HD2YFZ5+5BhxZn8BhCm1Arl8Irtv48avCNB/a9+yboQ4AfOCglEc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--sesse.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=thZ+Gqhk; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--sesse.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc693399655so17099513276.1 for ; Sat, 18 May 2024 09:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716051221; x=1716656021; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=n5I7/cV4Teng9SNAxB7Q/fNg2l8k9eQi6VqzuWVRqv8=; b=thZ+Gqhksug4vt3FQy5N9a3XP79HFWSpci30I0wDONo8Lz5OPq508c97e+C7HPPznE Nl9Zha2T8y8A+NzclUDtNb0z2KOAJj12GgzeH0jV2NK/tWjqU5hX/bWeL8ir541KQdsW BCjrTxwyHpLNZGI3A4cvn+/iK/Mzph7oE3z5cpyLisSIAp1vHdJ/TOj58SpsWIcvOrba BfXVI892vGbG/RuBVh412FAjtBZchRcA3NIj0qYYTB5+t3SRAllT73VcPWp7TnYZWwvw iipg4n3F9lOPZrmamgn2MmJ32d5X7Er+1LhS1zT2Ol1Zcy3lykSp1YsMNCvhqNaCtnu6 bsHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716051221; x=1716656021; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=n5I7/cV4Teng9SNAxB7Q/fNg2l8k9eQi6VqzuWVRqv8=; b=mzZrb24KFSSZCKCXLMvuYfx7owQJ/urxcHac62/+wE60LSixxAXFRTEY8zbdbEau4Q t3qghJ2bcLXTQcUl2xMlwBexqqM1VAUSf/lQVQcX2sUORBkg7F1Cn+0tkj0ieVwN53ns 0Txqw6dA3fvxL4fxj7XURrYm9lVTpn3wpUNF0jy62Ui7CEvk1ADMfQtEc5TQ4CBpHY+K bnuyVtHXrGLU0cpJ0bDSNP+GbnWuCb+PxdgMnyvgKtw/yhEf3mrnrRhs986synJfdV1x nW1vpUGgR3iq7R+drXRFnVuU9myU4BxhNNFgKtJKuckx3oRPCF5wOlKy4iYTv61aSYAQ BzLA== X-Forwarded-Encrypted: i=1; AJvYcCVuKVOY7ki0fe/YFMTgX3viUarM0p9ZvlOHwkoXYVH9dwSPYHzssqdrM4PLarxOkz7sGsr28pwlE7HRzpp2B3o6igJCG3Fcule6fEaP X-Gm-Message-State: AOJu0YxLICnB677cVLJ03VTcgC+LimoSSljUw9Ai+VF38z2/fSf6x0ez ox/3JlcwNVGbgD1WkttmmvbwkDvimDRgT6Fz6OZ9oORuu7Mip4peuVpE3JvgvjHUJ/47wu2VFA= = X-Received: from sesse.osl.corp.google.com ([2a00:79e0:18:10:8b68:8208:4316:d53b]) (user=sesse job=sendgmr) by 2002:a05:6902:1892:b0:dee:634a:d4d3 with SMTP id 3f1490d57ef6-dee634adc2emr5922754276.2.1716051220810; Sat, 18 May 2024 09:53:40 -0700 (PDT) Date: Sat, 18 May 2024 18:53:33 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240518165335.3963530-1-sesse@google.com> Subject: [PATCH v2 1/3] perf report: Support LLVM for addr2line() From: "Steinar H. Gunderson" To: acme@kernel.org Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, irogers@google.com, "Steinar H. Gunderson" Content-Type: text/plain; charset="UTF-8" In addition to the existing support for libbfd and calling out to an external addr2line command, add support for using libllvm directly. This is both faster than libbfd, and can be enabled in distro builds (the LLVM license has an explicit provision for GPLv2 compatibility). Thus, it is set as the primary choice if available. As an example, running perf report on a medium-size profile with DWARF-based backtraces took 58 seconds with LLVM, 78 seconds with libbfd, 153 seconds with external llvm-addr2line, and I got tired and aborted the test after waiting for 55 minutes with external bfd addr2line (which is the default for perf as compiled by distributions today). Evidently, for this case, the bfd addr2line process needs 18 seconds (on a 5.2 GHz Zen 3) to load the .debug ELF in question, hits the 1-second timeout and gets killed during initialization, getting restarted anew every time. Having an in-process addr2line makes this much more robust. As future extensions, libllvm can be used in many other places where we currently use libbfd or other libraries: - Symbol enumeration (in particular, for PE binaries). - Demangling (including non-Itanium demangling, e.g. Microsoft or Rust). - Disassembling (perf annotate). However, these are much less pressing; most people don't profile PE binaries, and perf has non-bfd paths for ELF. The same with demangling; the default _cxa_demangle path works fine for most users. Disassembling is coming in a later patch in the series; however do note that while bfd objdump can be slow on large binaries, it is possible to use --objdump=llvm-objdump to get the speed benefits. (It appears LLVM-based demangling is very simple, should we want that.) Tested with LLVM 14, 16, 18 and 19. For some reason, LLVM 12 was not correctly detected using feature_check, and thus was not tested. Signed-off-by: Steinar H. Gunderson --- tools/perf/Makefile.config | 15 ++++ tools/perf/builtin-version.c | 1 + tools/perf/util/Build | 1 + tools/perf/util/llvm-c-helpers.cpp | 129 +++++++++++++++++++++++++++++ tools/perf/util/llvm-c-helpers.h | 47 +++++++++++ tools/perf/util/srcline.c | 57 ++++++++++++- 6 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 tools/perf/util/llvm-c-helpers.cpp create mode 100644 tools/perf/util/llvm-c-helpers.h diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 7f1e016a9253..414a37f712bd 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -969,6 +969,21 @@ ifdef BUILD_NONDISTRO endif endif +ifndef NO_LLVM + $(call feature_check,llvm) + ifeq ($(feature-llvm), 1) + CFLAGS += -DHAVE_LLVM_SUPPORT + CXXFLAGS += -DHAVE_LLVM_SUPPORT + CXXFLAGS += $(shell $(LLVM_CONFIG) --cxxflags) + LIBLLVM = $(shell $(LLVM_CONFIG) --libs all) $(shell $(LLVM_CONFIG) --system-libs) + EXTLIBS += -L$(shell $(LLVM_CONFIG) --libdir) $(LIBLLVM) + $(call detected,CONFIG_LLVM) + else + $(warning No libllvm found, slower source file resolution, please install llvm-devel/llvm-dev) + NO_LLVM := 1 + endif +endif + ifndef NO_DEMANGLE $(call feature_check,cxa-demangle) ifeq ($(feature-cxa-demangle), 1) diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c index 398aa53e9e2e..4b252196de12 100644 --- a/tools/perf/builtin-version.c +++ b/tools/perf/builtin-version.c @@ -65,6 +65,7 @@ static void library_status(void) STATUS(HAVE_LIBBFD_SUPPORT, libbfd); STATUS(HAVE_DEBUGINFOD_SUPPORT, debuginfod); STATUS(HAVE_LIBELF_SUPPORT, libelf); + STATUS(HAVE_LIBLLVM_SUPPORT, libllvm); STATUS(HAVE_LIBNUMA_SUPPORT, libnuma); STATUS(HAVE_LIBNUMA_SUPPORT, numa_num_possible_cpus); STATUS(HAVE_LIBPERL_SUPPORT, libperl); diff --git a/tools/perf/util/Build b/tools/perf/util/Build index da64efd8718f..32c4e5e634ed 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -226,6 +226,7 @@ perf-$(CONFIG_CXX_DEMANGLE) += demangle-cxx.o perf-y += demangle-ocaml.o perf-y += demangle-java.o perf-y += demangle-rust.o +perf-$(CONFIG_LLVM) += llvm-c-helpers.o ifdef CONFIG_JITDUMP perf-$(CONFIG_LIBELF) += jitdump.o diff --git a/tools/perf/util/llvm-c-helpers.cpp b/tools/perf/util/llvm-c-helpers.cpp new file mode 100644 index 000000000000..2dafaaa86234 --- /dev/null +++ b/tools/perf/util/llvm-c-helpers.cpp @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Must come before the linux/compiler.h include, which defines several + * macros (e.g. noinline) that conflict with compiler builtins used + * by LLVM. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" /* Needed for LLVM 14. */ +#include +#pragma GCC diagnostic pop + +#include +#include +#include +#include "symbol_conf.h" +#include "llvm-c-helpers.h" + +using namespace llvm; +using llvm::symbolize::LLVMSymbolizer; + +/* + * Allocate a static LLVMSymbolizer, which will live to the end of the program. + * Unlike the bfd paths, LLVMSymbolizer has its own cache, so we do not need + * to store anything in the dso struct. + */ +static LLVMSymbolizer *get_symbolizer() +{ + static LLVMSymbolizer *instance = nullptr; + if (instance == nullptr) { + LLVMSymbolizer::Options opts; + /* + * LLVM sometimes demangles slightly different from the rest + * of the code, and this mismatch can cause new_inline_sym() + * to get confused and mark non-inline symbol as inlined + * (since the name does not properly match up with base_sym). + * Thus, disable the demangling and let the rest of the code + * handle it. + */ + opts.Demangle = false; + instance = new LLVMSymbolizer(opts); + } + return instance; +} + +/* Returns 0 on error, 1 on success. */ +static int extract_file_and_line(const DILineInfo& line_info, char **file, + unsigned int *line) +{ + if (file) { + if (line_info.FileName == "") { + /* Match the convention of libbfd. */ + *file = nullptr; + } else { + /* The caller expects to get something it can free(). */ + *file = strdup(line_info.FileName.c_str()); + if (*file == nullptr) + return 0; + } + } + if (line) + *line = line_info.Line; + return 1; +} + +extern "C" +int llvm_addr2line(const char *dso_name, u64 addr, + char **file, unsigned int *line, + bool unwind_inlines, + llvm_a2l_frame** inline_frames) +{ + LLVMSymbolizer *symbolizer = get_symbolizer(); + object::SectionedAddress sectioned_addr = { + addr, + object::SectionedAddress::UndefSection + }; + + if (unwind_inlines) { + Expected res_or_err = + symbolizer->symbolizeInlinedCode(dso_name, + sectioned_addr); + if (!res_or_err) + return 0; + unsigned num_frames = res_or_err->getNumberOfFrames(); + if (num_frames == 0) + return 0; + + if (extract_file_and_line( + res_or_err->getFrame(0), file, line) == 0) + return 0; + + *inline_frames = (llvm_a2l_frame*)malloc( + sizeof(**inline_frames) * num_frames); + if (*inline_frames == nullptr) + return 0; + + for (unsigned i = 0; i < num_frames; ++i) { + const DILineInfo& src = res_or_err->getFrame(i); + llvm_a2l_frame& dst = (*inline_frames)[i]; + if (src.FileName == "") + /* Match the convention of libbfd. */ + dst.filename = nullptr; + else + dst.filename = strdup(src.FileName.c_str()); + dst.funcname = strdup(src.FunctionName.c_str()); + dst.line = src.Line; + + if (dst.filename == nullptr || + dst.funcname == nullptr) { + for (unsigned j = 0; j <= i; ++j) { + free((*inline_frames)[j].filename); + free((*inline_frames)[j].funcname); + } + free(*inline_frames); + return 0; + } + } + + return num_frames; + } else { + if (inline_frames) + *inline_frames = nullptr; + + Expected res_or_err = + symbolizer->symbolizeCode(dso_name, sectioned_addr); + if (!res_or_err) + return 0; + return extract_file_and_line(*res_or_err, file, line); + } +} diff --git a/tools/perf/util/llvm-c-helpers.h b/tools/perf/util/llvm-c-helpers.h new file mode 100644 index 000000000000..f295aa2bcf2d --- /dev/null +++ b/tools/perf/util/llvm-c-helpers.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __PERF_LLVM_ADDR2LINE +#define __PERF_LLVM_ADDR2LINE 1 + +/* + * Helpers to call into LLVM C++ code from C, for the parts that do not have + * C APIs. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct llvm_a2l_frame { + char *filename; + char *funcname; + unsigned int line; +}; + +/* + * Implement addr2line() using libLLVM. LLVM is a C++ API, and + * many of the linux/ headers cannot be included in a C++ compile unit, + * so we need to make a little bridge code here. llvm_addr2line() will + * convert the inline frame information from LLVM's internal structures + * and put them into a flat array given in inline_frames. The caller + * is then responsible for taking that array and convert it into perf's + * regular inline frame structures (which depend on e.g. struct list_head). + * + * If the address could not be resolved, or an error occurred (e.g. OOM), + * returns 0. Otherwise, returns the number of inline frames (which means 1 + * if the address was not part of an inlined function). If unwind_inlines + * is set and the return code is nonzero, inline_frames will be set to + * a newly allocated array with that length. The caller is then responsible + * for freeing both the strings and the array itself. + */ +int llvm_addr2line(const char *dso_name, + u64 addr, + char **file, + unsigned int *line, + bool unwind_inlines, + struct llvm_a2l_frame **inline_frames); + +#ifdef __cplusplus +} +#endif + +#endif /* __PERF_LLVM_ADDR2LINE */ diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index 9d670d8c1c08..0505b4c16608 100644 --- a/tools/perf/util/srcline.c +++ b/tools/perf/util/srcline.c @@ -16,6 +16,9 @@ #include "util/debug.h" #include "util/callchain.h" #include "util/symbol_conf.h" +#ifdef HAVE_LLVM_SUPPORT +#include "util/llvm-c-helpers.h" +#endif #include "srcline.h" #include "string2.h" #include "symbol.h" @@ -130,7 +133,59 @@ static struct symbol *new_inline_sym(struct dso *dso, #define MAX_INLINE_NEST 1024 -#ifdef HAVE_LIBBFD_SUPPORT +#ifdef HAVE_LLVM_SUPPORT + +static void free_llvm_inline_frames(struct llvm_a2l_frame *inline_frames, + int num_frames) +{ + if (inline_frames != NULL) { + for (int i = 0; i < num_frames; ++i) { + free(inline_frames[i].filename); + free(inline_frames[i].funcname); + } + free(inline_frames); + } +} + +static int addr2line(const char *dso_name, u64 addr, + char **file, unsigned int *line, struct dso *dso, + bool unwind_inlines, struct inline_node *node, + struct symbol *sym) +{ + struct llvm_a2l_frame *inline_frames = NULL; + int num_frames = llvm_addr2line(dso_name, addr, file, line, + node && unwind_inlines, &inline_frames); + + if (num_frames == 0 || !inline_frames) { + /* Error, or we didn't want inlines. */ + return num_frames; + } + + for (int i = 0; i < num_frames; ++i) { + struct symbol *inline_sym = + new_inline_sym(dso, sym, inline_frames[i].funcname); + char *srcline = NULL; + + if (inline_frames[i].filename) + srcline = srcline_from_fileline( + inline_frames[i].filename, + inline_frames[i].line); + if (inline_list__append(inline_sym, srcline, node) != 0) { + free_llvm_inline_frames(inline_frames, num_frames); + return 0; + } + } + free_llvm_inline_frames(inline_frames, num_frames); + + return num_frames; +} + +void dso__free_a2l(struct dso *) +{ + /* Nothing to free. */ +} + +#elif defined(HAVE_LIBBFD_SUPPORT) /* * Implement addr2line using libbfd. -- 2.43.0