Message ID | 20230417122943.2155502-2-anders.roxell@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2092101vqo; Mon, 17 Apr 2023 05:37:25 -0700 (PDT) X-Google-Smtp-Source: AKy350bFSjbFFG2pMGKL7h9mgBP/t0B01J0PSmCy3hfn9lbSiB5mnKHLKzdi/yloBWji6aEpdO6q X-Received: by 2002:a17:903:120d:b0:1a1:cf70:33c0 with SMTP id l13-20020a170903120d00b001a1cf7033c0mr14775737plh.33.1681735045432; Mon, 17 Apr 2023 05:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681735045; cv=none; d=google.com; s=arc-20160816; b=P1eO2xtOeFTScOSfKtFfiwg8QgQjlZKAcBg+BhxeFkRCcTi3M1IgEExEjSarwrfur+ HJpF5rGxaesw43qkfHS+YkTHyCJFd2Jwv+i9udYlzRbaQfRKFPOAoS319uSrpZe+ehA2 DZs2d6/9XJlxkt1AjYL+jobJZGFLqTubxDnZ85IIFZvZVqF9iQVsvqMt6ZUkOCeKtdGz zKPWaoa5mX/O/LE5yZ0dYoVlRGjZ9updTGS8T6U0T2cyUEtsZ6TdWup4zRdZCc4ra1+6 ck7Z3TEkwzi2EJzWrZouRb2tfwaUazrA1RLHUiDgnrEjx7Q985upXiOkGLirQG22Fbyx EbcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H9SW4BaZ1bnKVP1weVI2e85RynWnU48bLznC9wO1o9M=; b=qRcGi/X8C5SjfFiZRnDH/YJuzp4QK1dE266CJrqwD557WVgd1hkmyfJNuESxkYLrU3 7NPgo++ZnAhvNBxMqi+dHF6/D6lTUDVky1tpulh9HbRpvZIecNLMa8B3B2ppIkLIAh7z B+ygzpzgLlOzkgiWlLAGR6dLfV91S+J0SM0H9aUvWNkqyYf9Fc240/dLnoo34bggiBk4 Hh+FlP+IAd3EuRhNlsZCIae/JYLj8CFH5ldkP+B6oHEp4TjrnxDfBV4dIiB+bri9uX8s ugD9rkrhQYCYwbCBFtC4fUWyEapFud8U1uF57Ymy3TxWsUzZRxRzX0a6CD72KsrpN287 mm3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n3zPin0s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a170902708900b001a6cb738b8csi3641330plk.550.2023.04.17.05.37.11; Mon, 17 Apr 2023 05:37:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n3zPin0s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbjDQMaY (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Mon, 17 Apr 2023 08:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230385AbjDQMaT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Apr 2023 08:30:19 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBB43468D for <linux-kernel@vger.kernel.org>; Mon, 17 Apr 2023 05:30:14 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id by8so26068219ljb.13 for <linux-kernel@vger.kernel.org>; Mon, 17 Apr 2023 05:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681734613; x=1684326613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H9SW4BaZ1bnKVP1weVI2e85RynWnU48bLznC9wO1o9M=; b=n3zPin0s6G1kVf80R6NptUIL4S3g+P69ADkrw+7CjbBdWnHZAogR6n8d7yvle5PpkC N2qD3f66q4c1WuJJH3FC7IEyu49Ue0xXjqtxY5tz+Yd2eWdFli+V0m02Vs2vkkgobOb6 /EEatrtb5D817UZRcI4zZUpNKlarszn2yTNKMc633kSVLPqSxgDv+hIl6fQRW0Th5rud 5oJKMxbsSAn2FYb5E9GmEQTFxIKKSETJgwQToXiuD6bixtmU6h5/FXEYcmaysX9KpzuB kaQA2hMmfpEFr2V5bYiHWmVt/p17AW/+J57BCjvw7aP1yPVqYWnC7e6oHnl2kWsTAJJ3 6DaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681734613; x=1684326613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9SW4BaZ1bnKVP1weVI2e85RynWnU48bLznC9wO1o9M=; b=ZHJ4KVowJvo4HknO6ZixxpN87AOrBXIcut533wXIsbatQlICfXd4Lav3DCrGZDAk7H 0NkvT7snSgeCaT/S3z/5RTWh6Yum81GOY0u1jIUjpVa5YTuzx79hbHzGAlIdwzIR9zDC GqzjAD2HT2OKNVXIwG4BP3OdISc8+SlIn7SUWwUwOT9wRp6QtIHtaQsqsFtyJR7cgvU4 /ahU6rdBM1n1h32Px83VMJfwFR5jwsiXddEw9+JmYbmIyruFyLJ0HZiEM55m6WIn+bIj +dRBtSa2xDEifYjxqJTjDAdrGHQpdgyyYj/s2/3bBB354lIQEUkx1WolaMwB915/2j1Z ktjQ== X-Gm-Message-State: AAQBX9fPSvS7t/EmFrZb3Kw1XU+LS1XVTwOH32DCUUpTNZ9Fm4/yp3Ov fxuqlgoNFZRadMqATn64ZTgySw== X-Received: by 2002:a2e:9857:0:b0:2a8:c82f:2996 with SMTP id e23-20020a2e9857000000b002a8c82f2996mr759543ljj.43.1681734612901; Mon, 17 Apr 2023 05:30:12 -0700 (PDT) Received: from localhost (c-9b0ee555.07-21-73746f28.bbcust.telenor.se. [85.229.14.155]) by smtp.gmail.com with ESMTPSA id l20-20020a19c214000000b004ed149acc08sm1889569lfc.93.2023.04.17.05.30.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 05:30:12 -0700 (PDT) From: Anders Roxell <anders.roxell@linaro.org> To: stable@vger.kernel.org Cc: acme@redhat.com, andres@anarazel.de, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Quentin Monnet <quentin@isovalent.com>, Alexei Starovoitov <ast@kernel.org>, Ben Hutchings <benh@debian.org>, Jiri Olsa <jolsa@kernel.org>, Sedat Dilek <sedat.dilek@gmail.com>, bpf@vger.kernel.org, Anders Roxell <anders.roxell@linaro.org> Subject: [backport PATCH 1/2] tools perf: Fix compilation error with new binutils Date: Mon, 17 Apr 2023 14:29:42 +0200 Message-Id: <20230417122943.2155502-2-anders.roxell@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417122943.2155502-1-anders.roxell@linaro.org> References: <20230417122943.2155502-1-anders.roxell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763427006843675771?= X-GMAIL-MSGID: =?utf-8?q?1763427006843675771?= |
Series |
stable v5.15, v5.10 and v5.4: fix perf build errors
|
|
Commit Message
Anders Roxell
April 17, 2023, 12:29 p.m. UTC
From: Andres Freund <andres@anarazel.de> binutils changed the signature of init_disassemble_info(), which now causes compilation failures for tools/perf/util/annotate.c, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 Wire up the feature test and switch to init_disassemble_info_compat(), which were introduced in prior commits, fixing the compilation failure. I verified that perf can still disassemble bpf programs by using bpftrace under load, recording a perf trace, and then annotating the bpf "function" with and without the changes. With old binutils there's no change in output before/after this patch. When comparing the output from old binutils (2.35) to new bintuils with the patch (upstream snapshot) there are a few output differences, but they are unrelated to this patch. An example hunk is: 1.15 : 55:mov %rbp,%rdx 0.00 : 58:add $0xfffffffffffffff8,%rdx 0.00 : 5c:xor %ecx,%ecx - 1.03 : 5e:callq 0xffffffffe12aca3c + 1.03 : 5e:call 0xffffffffe12aca3c 0.00 : 63:xor %eax,%eax - 2.18 : 65:leaveq - 2.82 : 66:retq + 2.18 : 65:leave + 2.82 : 66:ret Signed-off-by: Andres Freund <andres@anarazel.de> Acked-by: Quentin Monnet <quentin@isovalent.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Ben Hutchings <benh@debian.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de Link: https://lore.kernel.org/r/20220801013834.156015-5-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- tools/perf/Makefile.config | 8 ++++++++ tools/perf/util/annotate.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-)
Comments
On Mon, Apr 17, 2023 at 5:30 AM Anders Roxell <anders.roxell@linaro.org> wrote: > > From: Andres Freund <andres@anarazel.de> > > binutils changed the signature of init_disassemble_info(), which now causes > compilation failures for tools/perf/util/annotate.c, e.g. on debian > unstable. Thanks, I believe the compilation issue may well be resolved by: https://lore.kernel.org/lkml/20230311065753.3012826-8-irogers@google.com/ where binutils is made opt-in rather than opt-out. > Relevant binutils commit: > > https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 > > Wire up the feature test and switch to init_disassemble_info_compat(), > which were introduced in prior commits, fixing the compilation failure. I was kind of surprised to see no version check ifdef. Is init_disassemble_info_compat is supported in older binutils? Thanks, Ian > I verified that perf can still disassemble bpf programs by using bpftrace > under load, recording a perf trace, and then annotating the bpf "function" > with and without the changes. With old binutils there's no change in output > before/after this patch. When comparing the output from old binutils (2.35) > to new bintuils with the patch (upstream snapshot) there are a few output > differences, but they are unrelated to this patch. An example hunk is: > > 1.15 : 55:mov %rbp,%rdx > 0.00 : 58:add $0xfffffffffffffff8,%rdx > 0.00 : 5c:xor %ecx,%ecx > - 1.03 : 5e:callq 0xffffffffe12aca3c > + 1.03 : 5e:call 0xffffffffe12aca3c > 0.00 : 63:xor %eax,%eax > - 2.18 : 65:leaveq > - 2.82 : 66:retq > + 2.18 : 65:leave > + 2.82 : 66:ret > > Signed-off-by: Andres Freund <andres@anarazel.de> > Acked-by: Quentin Monnet <quentin@isovalent.com> > Cc: Alexei Starovoitov <ast@kernel.org> > Cc: Ben Hutchings <benh@debian.org> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Sedat Dilek <sedat.dilek@gmail.com> > Cc: bpf@vger.kernel.org > Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de > Link: https://lore.kernel.org/r/20220801013834.156015-5-andres@anarazel.de > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > tools/perf/Makefile.config | 8 ++++++++ > tools/perf/util/annotate.c | 7 ++++--- > 2 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index 3e7706c251e9..55905571f87b 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -281,6 +281,7 @@ FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS) > FEATURE_CHECK_LDFLAGS-libaio = -lrt > > FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl > +FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl > > CORE_CFLAGS += -fno-omit-frame-pointer > CORE_CFLAGS += -ggdb3 > @@ -838,13 +839,16 @@ else > ifeq ($(feature-libbfd-liberty), 1) > EXTLIBS += -lbfd -lopcodes -liberty > FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl > + FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl > else > ifeq ($(feature-libbfd-liberty-z), 1) > EXTLIBS += -lbfd -lopcodes -liberty -lz > FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl > + FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl > endif > endif > $(call feature_check,disassembler-four-args) > + $(call feature_check,disassembler-init-styled) > endif > > ifeq ($(feature-libbfd-buildid), 1) > @@ -957,6 +961,10 @@ ifeq ($(feature-disassembler-four-args), 1) > CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE > endif > > +ifeq ($(feature-disassembler-init-styled), 1) > + CFLAGS += -DDISASM_INIT_STYLED > +endif > + > ifeq (${IS_64_BIT}, 1) > ifndef NO_PERF_READ_VDSO32 > $(call feature_check,compile-32) > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c > index 308189454788..f2d1741b7610 100644 > --- a/tools/perf/util/annotate.c > +++ b/tools/perf/util/annotate.c > @@ -1684,6 +1684,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil > #define PACKAGE "perf" > #include <bfd.h> > #include <dis-asm.h> > +#include <tools/dis-asm-compat.h> > > static int symbol__disassemble_bpf(struct symbol *sym, > struct annotate_args *args) > @@ -1726,9 +1727,9 @@ static int symbol__disassemble_bpf(struct symbol *sym, > ret = errno; > goto out; > } > - init_disassemble_info(&info, s, > - (fprintf_ftype) fprintf); > - > + init_disassemble_info_compat(&info, s, > + (fprintf_ftype) fprintf, > + fprintf_styled); > info.arch = bfd_get_arch(bfdf); > info.mach = bfd_get_mach(bfdf); > > -- > 2.39.2 >
2023-04-17 10:14 UTC-0700 ~ Ian Rogers <irogers@google.com> > On Mon, Apr 17, 2023 at 5:30 AM Anders Roxell <anders.roxell@linaro.org> wrote: >> >> From: Andres Freund <andres@anarazel.de> >> >> binutils changed the signature of init_disassemble_info(), which now causes >> compilation failures for tools/perf/util/annotate.c, e.g. on debian >> unstable. > > Thanks, I believe the compilation issue may well be resolved by: > https://lore.kernel.org/lkml/20230311065753.3012826-8-irogers@google.com/ > where binutils is made opt-in rather than opt-out. Hi, These commits are to make it possible to build against recent binutils, without having to leave it out at compile time, so as I understand they address a different issue? > >> Relevant binutils commit: >> >> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 >> >> Wire up the feature test and switch to init_disassemble_info_compat(), >> which were introduced in prior commits, fixing the compilation failure. > > I was kind of surprised to see no version check ifdef. Is > init_disassemble_info_compat is supported in older binutils? It is not part of binutils, it was introduced in commit a45b3d692623 ("tools include: add dis-asm-compat.h to handle version differences"), which should likely be backported alongside these ones if it hasn't been already. Possibly the others from the same series [0], as well? I think all 5 patches from Andres' series were backported to 5.15 [1]. [0] https://lore.kernel.org/all/20220703212551.1114923-1-andres@anarazel.de/t/#m999a44663894e235b523ffc41ce87e956019ea72 [1] https://lore.kernel.org/all/e6e2df31-6327-f2ad-3049-0cbfa214ae5c@hauke-m.de/t/#u Best regards, Quentin
On Tue, Apr 18, 2023 at 9:43 AM Quentin Monnet <quentin@isovalent.com> wrote: > > 2023-04-17 10:14 UTC-0700 ~ Ian Rogers <irogers@google.com> > > On Mon, Apr 17, 2023 at 5:30 AM Anders Roxell <anders.roxell@linaro.org> wrote: > >> > >> From: Andres Freund <andres@anarazel.de> > >> > >> binutils changed the signature of init_disassemble_info(), which now causes > >> compilation failures for tools/perf/util/annotate.c, e.g. on debian > >> unstable. > > > > Thanks, I believe the compilation issue may well be resolved by: > > https://lore.kernel.org/lkml/20230311065753.3012826-8-irogers@google.com/ > > where binutils is made opt-in rather than opt-out. > > Hi, > These commits are to make it possible to build against recent binutils, > without having to leave it out at compile time, so as I understand they > address a different issue? Kind of. We don't want the Linux perf build to break. Previously if binutils were installed then Linux perf would default to linking with it and break your build were binutils to change its API. That is no longer the case as we don't default to linking against binutils. This was motivated by distributions not being able to link Linux perf with binutils due to the license incompatibilities. I don't see a problem supporting linking against newer and older binutils if people want to on non-distributed binaries. We'll probably need more build tests/containers to cover the possibilities of this. I'm not sure what's motivating binutils support other than personal experimentation though. Thanks, Ian > > > >> Relevant binutils commit: > >> > >> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 > >> > >> Wire up the feature test and switch to init_disassemble_info_compat(), > >> which were introduced in prior commits, fixing the compilation failure. > > > > I was kind of surprised to see no version check ifdef. Is > > init_disassemble_info_compat is supported in older binutils? > > It is not part of binutils, it was introduced in commit a45b3d692623 > ("tools include: add dis-asm-compat.h to handle version differences"), > which should likely be backported alongside these ones if it hasn't been > already. Possibly the others from the same series [0], as well? > > I think all 5 patches from Andres' series were backported to 5.15 [1]. > > [0] > https://lore.kernel.org/all/20220703212551.1114923-1-andres@anarazel.de/t/#m999a44663894e235b523ffc41ce87e956019ea72 > [1] > https://lore.kernel.org/all/e6e2df31-6327-f2ad-3049-0cbfa214ae5c@hauke-m.de/t/#u > > Best regards, > Quentin
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 3e7706c251e9..55905571f87b 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -281,6 +281,7 @@ FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS) FEATURE_CHECK_LDFLAGS-libaio = -lrt FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl +FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl CORE_CFLAGS += -fno-omit-frame-pointer CORE_CFLAGS += -ggdb3 @@ -838,13 +839,16 @@ else ifeq ($(feature-libbfd-liberty), 1) EXTLIBS += -lbfd -lopcodes -liberty FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl + FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl else ifeq ($(feature-libbfd-liberty-z), 1) EXTLIBS += -lbfd -lopcodes -liberty -lz FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl + FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl endif endif $(call feature_check,disassembler-four-args) + $(call feature_check,disassembler-init-styled) endif ifeq ($(feature-libbfd-buildid), 1) @@ -957,6 +961,10 @@ ifeq ($(feature-disassembler-four-args), 1) CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE endif +ifeq ($(feature-disassembler-init-styled), 1) + CFLAGS += -DDISASM_INIT_STYLED +endif + ifeq (${IS_64_BIT}, 1) ifndef NO_PERF_READ_VDSO32 $(call feature_check,compile-32) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 308189454788..f2d1741b7610 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1684,6 +1684,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil #define PACKAGE "perf" #include <bfd.h> #include <dis-asm.h> +#include <tools/dis-asm-compat.h> static int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args) @@ -1726,9 +1727,9 @@ static int symbol__disassemble_bpf(struct symbol *sym, ret = errno; goto out; } - init_disassemble_info(&info, s, - (fprintf_ftype) fprintf); - + init_disassemble_info_compat(&info, s, + (fprintf_ftype) fprintf, + fprintf_styled); info.arch = bfd_get_arch(bfdf); info.mach = bfd_get_mach(bfdf);