From patchwork Fri May 19 08:20:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 764491 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wTgyp3Zwdz9s7y for ; Fri, 19 May 2017 18:22:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rQ4O/n3d"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wTgyp1nkGzDqfB for ; Fri, 19 May 2017 18:22:26 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rQ4O/n3d"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wTgx2104zzDqcl for ; Fri, 19 May 2017 18:20:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rQ4O/n3d"; dkim-atps=neutral Received: by mail-wm0-x244.google.com with SMTP id k15so15339175wmh.3 for ; Fri, 19 May 2017 01:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0zS9O3d77mvP33TLIIFsMg/mT7m86aNUYEOdRmGPaic=; b=rQ4O/n3dpxkVYBj9yW6YDqY9E8yoSaDI4CKKsTWM2n2yHf0lajLHo+QLbirCN7Iq5H 3aslzfqL4PCda1F2/GwvHiGBzxTzbyh7Hd0Fx9AmQLH6yh9uVlDRmr7HThqrK+AR3oYl QGX78XhGY+PGKaZbHEJaPyOVAkLvoQZryaMNa0kbNfBhnwr6ELUB/tpRKfA17Kr1mySt ZM7vgNDJU097V8si4kK+TgsH5NecELMCdZ2klx9JQYs05LB70kmUEd3zEhZjg9YCn8Gk dF7eLfz61qq2dWiXZrZ2wpYb2v0v0kJcfIk8DbmLWgvhBzb5ZM0S44U4U9A5+7aGqstG 0XCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0zS9O3d77mvP33TLIIFsMg/mT7m86aNUYEOdRmGPaic=; b=OgkBAXx/vJHaCUnOQfNw67CvE48Si1pY1QgmfSfp1tZu+PAzm5nL2qDwnLERMQivrJ VnF2I8NsZt5eHlhoZO1GGXRPmQjYnmsG0dclR7JE9fVRMZEShEHBOGLzHitT7LWwBBUX Quq/CPxkXSAVmXS2TyzFVPEli6pnoiaTEUCK8PFXUIwx6HUcACx0W2s/38FfBJNmxsS0 BRCo/pB1EKuG6DNKIw7001jabvHVqcXAyxvQPBXxrNA/Hb6X2XB/Emjxu8ssIvXvgj7t gvYGkNgQyBiYcWsxiDsZXkuIdeGI0oN1Oxs2OfyoE0LsBRCZ3lopHK1eUqrNoqgFbjwR k+pw== X-Gm-Message-State: AODbwcC48XiK5f4sQ9WNsWDrbrmUW9oFCEZFGGFv8cxvWPvXEgWV77pl A6LyGjYPQDughw== X-Received: by 10.28.182.70 with SMTP id g67mr5849710wmf.139.1495182051289; Fri, 19 May 2017 01:20:51 -0700 (PDT) Received: from [192.168.10.165] (94-39-157-43.adsl-ull.clienti.tiscali.it. [94.39.157.43]) by smtp.googlemail.com with ESMTPSA id t30sm2025465wrc.24.2017.05.19.01.20.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 01:20:50 -0700 (PDT) Subject: Re: [PATCH] perf: libdw support for powerpc From: Paolo Bonzini To: "Naveen N. Rao" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170518170018.10507-1-pbonzini@redhat.com> <1495131092.c1jiws8vlt.astroid@naverao1-tp.none> Message-ID: <24a6080b-c0bb-9965-013c-60b4368c649c@redhat.com> Date: Fri, 19 May 2017 10:20:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, Ravi Bangoria , acme@kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 18/05/2017 20:48, Paolo Bonzini wrote: > > > On 18/05/2017 20:19, Naveen N. Rao wrote: >> Paolo Bonzini wrote: >>> The ARM and x86 architectures already use libdw, and it is useful to >>> have as much common code for the unwinder as possible. Porting PPC >>> to libdw only needs an architecture-specific hook to move the register >>> state from perf to libdw. >> >> Thanks. Ravi has had a similar patch locally, but from what I >> understand, there are issues with libdw based unwinding on powerpc64. I >> gave this a quick test and I don't see the user-space call trace being >> unwinded properly with libdw. > > I don't see that problem: > > - 99,98% 0,00% dd libc-2.17.so [.] generic_start_main.isra.0 > generic_start_main.isra.0 > - main > - 99,97% iread > - 97,82% sys_read > - 96,97% extract_entropy_user > 89,44% powernv_get_random_long > 4,63% sha_transform > 2,07% extract_buf > 1,15% _raw_spin_lock_irqsave > 0,51% extract_buf > > (This is "perf record dd if=/dev/urandom of=/dev/null bs=512"). > > Can you copy the contents of tools/perf/.config-detected here? FWIW it works fine for me here with latest Linus tree and your suggested change to fix compilation: Thanks, Paolo --- a/tools/perf/arch/powerpc/util/unwind-libdw.c +++ b/tools/perf/arch/powerpc/util/unwind-libdw.c @@ -1,7 +1,7 @@ #include -#include "../../util/util.h" #include "../../util/unwind-libdw.h" #include "../../util/perf_regs.h" +#include "../../util/event.h" /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils. */ static const int special_regs[3][2] = {