Received: by 10.213.65.68 with SMTP id h4csp2117395imn; Sun, 8 Apr 2018 20:08:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+mgyUUm/tWKYtIgpuEymSKti2BgI4oI2Uc7mzFAh0zk37Ms4LIFAqbIaKa00NOGSobe5sO X-Received: by 2002:a17:902:32a2:: with SMTP id z31-v6mr37892133plb.41.1523243305491; Sun, 08 Apr 2018 20:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243305; cv=none; d=google.com; s=arc-20160816; b=F/L5OflyY9oCVHM2s3i+Un4nwOfZJh9t41VZWgPHIvtN9laPQXUX0p22LZGxk0xniv tZUJ3ivQ3fygEcpxGOVJZKOkUniMyjdm/rqC++klJ1IVRJHlJ4LepDKf1OtoGhm5EyE1 QQuImdbpXOR1PpIJ533hhDIGCMCuMDEVn2ah28cZ//pncxLDScMs/yLCMvxZRZUmsbGC C9gaJ8UVly1k3ZP4Sotz3WZY224IGo2JcYb2NOuo16W+bFDHwLs7pYE/KeV/+3W3xh1N bV27uyHAeoz4rJHGSwZgRGbDNRW4UGAE0eF3g+qp0Csi1OXupLe2ryhcTjn2lRn+d1cC KTqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=h/ok66dCn++IhbcSbC/KnQk7w9N0o+KLJhX+4oQvobI=; b=J4aGyf3vwmu+FtqA9yVpurv9DrTHJrIxO+IcIfybmYg9wfV38nq2cZ6GB9POo+hDif 4Gek3N2K/TNf506uWas2fzs+VYE07AG7D1VM9Jsnt76ylyygYyK+nEmeBPs5o/1UttxY vAGX4LdsXBZTQ6fEaKa6RDQ16h5QrD9tse28+8z3/q4lpun8tRlDoL8UawfBTBQMhYw3 Yako9Y1VZB/kqg+DagMkXhY1CbFBsuNG9ErWiod4iwCTom1GIaT4iZdRoERNdcB3gp/d GRLCwpWe9njBrdg5QfHJIljpCdUdgpyfH+NqG4VG1+HtFd7g722fMZ8BQJ1zIdbD+esT a9oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=aa9YHH6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si13886458pld.396.2018.04.08.20.07.48; Sun, 08 Apr 2018 20:08:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=aa9YHH6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757503AbeDIB7N (ORCPT + 99 others); Sun, 8 Apr 2018 21:59:13 -0400 Received: from mail-sn1nam01on0091.outbound.protection.outlook.com ([104.47.32.91]:51937 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756486AbeDIAcR (ORCPT ); Sun, 8 Apr 2018 20:32:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h/ok66dCn++IhbcSbC/KnQk7w9N0o+KLJhX+4oQvobI=; b=aa9YHH6MW7V/VBRLaQWCTjjOGRBCsDIC2JKI4jwyiZIzvCsUr/yEA33ICarXfiZxt43yHFICrLpONfhgjqRgxfVViGGr50QOEpoB4QGjOwD9G2B/I6wx9B6cOJrBEnPIVoaZdBje7OSsLQsl6G3i4gE0mLM0MODDpOqL8Qr9/ps= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0870.namprd21.prod.outlook.com (10.167.110.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:32:12 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:32:12 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Jiri Olsa , David Ahern , He Kuang , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 208/293] perf unwind: Do not fail due to missing unwind support Thread-Topic: [PATCH AUTOSEL for 4.9 208/293] perf unwind: Do not fail due to missing unwind support Thread-Index: AQHTz5lHHRYH+9j5+Uuk6HAGe+lFVA== Date: Mon, 9 Apr 2018 00:25:36 +0000 Message-ID: <20180409002239.163177-208-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0870;7:ZqlyGXy9uLJNC4I0Wtgi8H/oVULrlZrWEYT8tQiuipOjrm3yBwnbBPcDhCEXdqOSH7jOrP72oup8Gf7sNgiPs4qXzIWkkRC7s7YvgXl5TNdO2ydXMpx8yb4jDzmoSoV7ZFYrXnsX70EHTVIILjntVB7GoYLreDNbTuEQGm9XKFdObgNSBSKeNJ5xeJoPeVo1xJ49+MbBuiEkktxaiRDUjoy2TiT2KPS4BZLeQiU5ycs5Pgy26a2in7bhMRPOkOZ5;20:z4Dyjru6cSXOoZtv1j+Vu3fMNAKZUy3Dcp1jqTBCiw+2aYvRqkbjfqpgVzudJbb+pc3WeVLMA4T8M0amb/bf1+eehaP4Q5EQeW9fuvbOnc8kUkR4YuAjabyvfVaIG3RH+Rhi/2fC/gEpZfldFryL4bvMVfgG7eMW2ONtDb6EmII= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 496a11fe-7816-4d70-4b77-08d59db155fd x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0870; x-ms-traffictypediagnostic: DM5PR2101MB0870: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(89211679590171)(50582790962513)(85827821059158)(42068640409301); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0870;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0870; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(366004)(396003)(39380400002)(376002)(199004)(189003)(53936002)(2906002)(6512007)(6306002)(102836004)(2616005)(76176011)(14454004)(446003)(10090500001)(11346002)(476003)(39060400002)(486006)(107886003)(59450400001)(2900100001)(97736004)(966005)(66066001)(6506007)(6436002)(106356001)(99286004)(105586002)(3660700001)(6116002)(86612001)(3280700002)(6666003)(2501003)(10290500003)(26005)(8676002)(8936002)(478600001)(68736007)(5250100002)(5660300001)(316002)(4326008)(72206003)(186003)(110136005)(6486002)(7736002)(25786009)(3846002)(86362001)(36756003)(22452003)(81156014)(81166006)(305945005)(54906003)(1076002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0870;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: JbnZAtaFsL1tKOcQf7NzFh82yNYzSVx72Ma8f5fHC+oFrASA3X8qLI/gO9ssQ8neJaJ9WLTb/kK/j6Jsm2t4q5qM2Crg41JO+CEmEBlxWyPfchXL6U722wycRRt9FVBcT8mhoehrRWwCXJSI4Id4sVtQXscJ2ygP7Wo56zsw4aF2TkoEaG+FmTcez0QU3WqHSeRqedvTbVRSMv8Xt6icH6lBzeFx8mommLMWyPEq3WPTsAsUvonaV58jg8iwwr+35vIqfPDf8pRp/uC+Fmh9TVLAl3kugDuUA5qRoMcH+egJSJNW6tLN5f9YFLLEH5JtzZrVsv2+376fzPfyaiHIVr6JRXfrPSrJx9QxNdSXSkyf0ngvJKboHOTO53usHSMkP4Li0dE8FxLUZIh3JUdPf1EwPX4tJvAb1xLY8UOpJsw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 496a11fe-7816-4d70-4b77-08d59db155fd X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:25:36.5190 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0870 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa [ Upstream commit 1934adf78e33fa69570a763c7ac5353212416bb0 ] We currently fail the MMAP event processing if we don't have the MMAP event's specific arch unwind support compiled in. That's wrong and can lead to unresolved mmaps in report output for 32bit binaries on 64bit server, like in this example on x86_64 server: $ cat ex.c int main(int argc, char **argv) { while (1) {} } $ gcc -o ex -m32 ex.c $ perf record ./ex ^C[ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.371 MB perf.data (9322 samples) ] Before: $ perf report --stdio SNIP # Overhead Command Shared Object Symbol # ........ ....... ................ ...................... # 100.00% ex [unknown] [.] 0x00000000080483de 0.00% ex [unknown] [.] 0x00000000f76dba4f 0.00% ex [unknown] [.] 0x00000000f76e4c11 0.00% ex [unknown] [.] 0x00000000f76daa30 After: $ perf report --stdio SNIP # Overhead Command Shared Object Symbol # ........ ....... ............. ............... # 100.00% ex ex [.] main 0.00% ex ld-2.24.so [.] _dl_start 0.00% ex ld-2.24.so [.] do_lookup_x 0.00% ex ld-2.24.so [.] _start The fix is not to fail, just warn if there's not unwind support compiled in. Reported-by: Michael Lyle Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: He Kuang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170704131131.27508-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/unwind-libunwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-li= bunwind.c index 6d542a4e0648..8aef572d0889 100644 --- a/tools/perf/util/unwind-libunwind.c +++ b/tools/perf/util/unwind-libunwind.c @@ -50,7 +50,7 @@ int unwind__prepare_access(struct thread *thread, struct = map *map, =20 if (!ops) { pr_err("unwind: target platform=3D%s is not supported\n", arch); - return -1; + return 0; } out_register: unwind__register_ops(thread, ops); --=20 2.15.1