Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6007854ybc; Wed, 27 Nov 2019 13:18:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwK59VBxrhZlNdbW2Y69S/NBmLji1MDIKvoZKxtjeQksqWtwGLO6EMdzn4wGRjkluTaU2lZ X-Received: by 2002:a17:906:4a0c:: with SMTP id w12mr51419990eju.306.1574889487068; Wed, 27 Nov 2019 13:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574889487; cv=none; d=google.com; s=arc-20160816; b=G8N/9/qPMD/TNdZnjayWx9IvmBK7Bt54u2jGKKzqkichQ4DBsrXRWuG/AHHYKu3WT9 +MV+U8OHKY7fV2VeAy8dFt4zwLUsGfMPym+miIOKy4Udf4Cb9MbECQj+ElHRBg0BRWq0 BsQqvAtjFHV0PKRKxQJklLrHTWbN/384ZcsbLQUXeo47H2paqInxQDjBNB0dr4w0Trin A3JiBxISGFHuwecoX5mO/UzyseA/EEV190ogxHPJnf52An8iFBpnhyFbuZo8EQ1lwusH gPXUGaJ96wgem4a3ZWmJgWHpJPbVmcArcCUAAmb+m9XzcHlrhAyMGxrnGsVjsms9I5lY 8xhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=F99XMPQ3TAH+uV2c/3H52TWBXa+PYGt7dcNa6t/ODb8=; b=A4FE6lAZnz54NkE+vxL1N5JKC7PECTQtkYBYcLkcYl9ztfsjWiqnAchZDAfKXkFDAv GSOolOYqPiizH+3pqZ7wYFy7ceDZCy40zZ+cMBk5l1E03uLQ0oOTidlE1/QGN+BlsXSh cM/qgnUDN5e7f7KLb2Z3jyLVN8xu68PJK/ayysXfdkHZ1iQozXbr1V5dclhM0sPCqis1 Rb495u0AAFkQxa8J8lQv6/NAaEqerFbwWlLVPVF/tboqEDla3T4HQHn4t7AKcJkECbUq qO8AIxo58VFcRZr3wzr0U3gkyeVzWIHsgDXkvodjfWTPRHO0SgDdq3LVo+a0+am8LlPM ZZgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b="Rh/Py5iA"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si830827ejd.79.2019.11.27.13.17.43; Wed, 27 Nov 2019 13:18:07 -0800 (PST) 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=@cloudflare.com header.s=google header.b="Rh/Py5iA"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732827AbfK0VPf (ORCPT + 99 others); Wed, 27 Nov 2019 16:15:35 -0500 Received: from mail-qv1-f66.google.com ([209.85.219.66]:44071 "EHLO mail-qv1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732826AbfK0VPc (ORCPT ); Wed, 27 Nov 2019 16:15:32 -0500 Received: by mail-qv1-f66.google.com with SMTP id t11so713254qvz.11 for ; Wed, 27 Nov 2019 13:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F99XMPQ3TAH+uV2c/3H52TWBXa+PYGt7dcNa6t/ODb8=; b=Rh/Py5iAqTgPLbvtB+41QKoCIj+6ktjR+xDaZrX02/6GEvukEwIP3xD4GWKrP3JKDk PPwCUuGOLvKom9XlvMl2aRlAxZcPJh+uOz2LC+iatHYW3hZTCLsLHsPog/4yI/DL6xmR /Pi1xqBkEw2DqHAqh30+MSTyc6kwugXvPSlJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F99XMPQ3TAH+uV2c/3H52TWBXa+PYGt7dcNa6t/ODb8=; b=s9CXiEIalOa/7mNwzaoEoGMK+iClXhy6fLjWqiuVAOLOdnRPjRJHHMhCOaqVu4a2mO NnwcXpcahqRqDoAIVC7fNssAUr+gjYu06K2Z/J2ppH6O9ROud1REzg0Svhf68CjxvYrU ZyGGILA4hDY9MURCq4ygrfWFw71cYmMNgo0/hyDffLNF3Hk0H8J+CyyX/WI2Ktu0vvp6 zPXYlMNIy7vXKx0EVN884I37en6BlaO8HN0C7MQjdumYi6meb7k9twKEVBUJvQdiB9ac uwclP1s5NrzTJlqVkSVCN4dwRmyKFuprBL2hCBwFopOZGY74GmhFtT5RqNOEQbEOoYxD PWrA== X-Gm-Message-State: APjAAAWTQNdWZWTpKeXvoHq1ciZquCBLug1rnZw4HZFV86AW3ROLMh6N Y8hCZJRsTegzoqhydCO8Qz4aD42khF/NKN7+cmVg7DTUK2k= X-Received: by 2002:a0c:e408:: with SMTP id o8mr7391529qvl.236.1574889331134; Wed, 27 Nov 2019 13:15:31 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ivan Babrou Date: Wed, 27 Nov 2019 13:15:20 -0800 Message-ID: Subject: Re: perf is unable to read dward from go programs To: linux-kernel Cc: linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , kernel-team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There were no response in linux-perf-users@, so I think it's fair to ask maintainers. On Fri, Nov 8, 2019 at 3:53 PM Ivan Babrou wrote: > > I have a simple piece of code that burns CPU for 1s: > > * https://gist.github.com/bobrik/cf022ff6950d09032fa13a984e2272ed > > I can build it just fine: go build -o /tmp/burn burn.go > > And I can see correct stacks if I record with fp: > > perf record -e cpu-clock -g -F 99 /tmp/burn > > But if I record with gwarf: > > perf record -e cpu-clock -g -F 99 --call-graph dwarf /tmp/burn > > Then stacks are lost with the following complaints during "perf script": > > BFD: Dwarf Error: found dwarf version '376', this reader only handles > version 2, 3 and 4 information. > BFD: Dwarf Error: found dwarf version '31863', this reader only > handles version 2, 3 and 4 information. > BFD: Dwarf Error: found dwarf version '65271', this reader only > handles version 2, 3 and 4 information. > BFD: Dwarf Error: found dwarf version '289', this reader only handles > version 2, 3 and 4 information. > ... > > That's on Linux 5.4-rc5 with binutils 2.28. On Linux 4.19.80 with > binutils 2.31.1 I don't see the error, but the stacks are not any > better: > > burn 788 3994.230871: 10101010 cpu-clock: > 479955 crypto/sha512.blockAVX2+0x965 (/tmp/burn) > > burn 786 3994.241393: 10101010 cpu-clock: > 40b2a7 runtime.mallocgc+0x697 (/tmp/burn) > > burn 782 3994.248061: 10101010 cpu-clock: > 4746f1 crypto/sha512.(*digest).Write+0x21 (/tmp/burn) > > Compare to an fp version: > > burn 762 3892.587246: 10101010 cpu-clock: > 479b19 crypto/sha512.blockAVX2+0xb29 (/tmp/burn) > d186b8c721c0c207 [unknown] ([unknown]) > > burn 760 3892.597158: 10101010 cpu-clock: > 474783 crypto/sha512.(*digest).Write+0xb3 (/tmp/burn) > 474e52 crypto/sha512.(*digest).checkSum+0xd2 (/tmp/burn) > 4749e3 crypto/sha512.(*digest).Sum+0xa3 (/tmp/burn) > 4840d3 main.burn+0xe3 (/tmp/burn) > 483fda main.main+0x2a (/tmp/burn) > 4298ee runtime.main+0x21e (/tmp/burn) > c000016060 [unknown] ([unknown]) > 89481eebc0313474 [unknown] ([unknown]) > > I can understand AVX being off, but other stacks should be in order. > > Interestingly, in production I can see that some binaries are not > affected by this issue. > > Is this an expected outcome?