Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396AbbDBO5i (ORCPT ); Thu, 2 Apr 2015 10:57:38 -0400 Received: from mail.kernel.org ([198.145.29.136]:40408 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbbDBO5e (ORCPT ); Thu, 2 Apr 2015 10:57:34 -0400 Date: Thu, 2 Apr 2015 11:57:32 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Subject: Re: [PATCH perf/core v2] perf-probe: Fix to track down unnamed union/structure members Message-ID: <20150402145732.GA11963@kernel.org> References: <20150401144111.GA4549@kernel.org> <20150402073312.14482.37942.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402073312.14482.37942.stgit@localhost.localdomain> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1526 Lines: 37 Em Thu, Apr 02, 2015 at 04:33:12PM +0900, Masami Hiramatsu escreveu: > Fix perf probe to track down unnamed union/structure members. > perf probe did not track down the tree of unnamed union/structure > members, since it just failed to find given "name" in a parent > structure/union. To solve this issue, I've introduced 2 changes. > > - Fix die_find_member() to track down the type-DIE if it is > unnamed, and if it contains the specified member, returns the > unnamed member. > (note that we don't return found member, since unnamed member > has the offset in the parent structure) > - Fix convert_variable_fields() to track down the unnamed union/ > structure (one-by-one). > > With this patch, perf probe can access unnamed fields. > ----- > #./perf probe -nfx ./perf lock__delete ops 'locked_ops=ops->locked.ops' > Added new event: > probe_perf:lock__delete (on lock__delete in /home/mhiramat/ksrc/linux-3/tools/perf/perf with ops locked_ops=ops->locked.ops) > > You can now use it in all perf tools, such as: > > perf record -e probe_perf:lock__delete -aR sleep 1 > ----- > > The original report of this issue is: https://lkml.org/lkml/2015/3/5/431 Thanks a lot! Applied, built and tested, all works as expected, Merged, - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/