From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754162AbbCFMDA (ORCPT ); Fri, 6 Mar 2015 07:03:00 -0500 Received: from mail9.hitachi.co.jp ([133.145.228.44]:49284 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752322AbbCFMC5 (ORCPT ); Fri, 6 Mar 2015 07:02:57 -0500 Message-ID: <54F9976A.3010808@hitachi.com> Date: Fri, 06 Mar 2015 21:02:50 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo CC: David Ahern , Linux Kernel Mailing List Subject: Re: perf probe: can't find unnamed union members References: <20150305153256.GX5187@kernel.org> In-Reply-To: <20150305153256.GX5187@kernel.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, (2015/03/06 0:32), Arnaldo Carvalho de Melo wrote: > > Hi Masami, > > [root@zoo ~]# perf probe -x ~/bin/perf -L lock__delete > 0 static void lock__delete(struct ins_operands *ops) > 1 { > 2 struct ins *ins = ops->locked.ins; > > 4 if (ins && ins->ops->free) > 5 ins->ops->free(ops->locked.ops); > else > 7 ins__delete(ops->locked.ops); > > 9 zfree(&ops->locked.ops); > 10 zfree(&ops->target.raw); > 11 zfree(&ops->target.name); > 12 } > > And: > > [root@zoo ~]# pahole ~/bin/perf -C ins_operands > struct ins_operands { > char * raw; /* 0 8 */ > struct { > char * raw; /* 8 8 */ > char * name; /* 16 8 */ > u64 addr; /* 24 8 */ > u64 offset; /* 32 8 */ > } target; /* 8 32 */ > union { > struct { > char * raw; /* 40 8 */ > char * name; /* 48 8 */ > u64 addr; /* 56 8 */ > } source; /* 24 */ > struct { > struct ins * ins; /* 40 8 */ > struct ins_operands * ops; /* 48 8 */ > } locked; /* 16 */ > }; /* 40 24 */ > /* --- cacheline 1 boundary (64 bytes) --- */ > > /* size: 64, cachelines: 1, members: 3 */ > }; > [root@zoo ~]# > > But: > > [root@zoo ~]# perf probe -x ~/bin/perf lock__delete ops 'locked_ops=ops->locked.ops' > ops(type:ins_operands) has no member locked. > Error: Failed to add events. > [root@zoo ~]# > > Yes, it has :-) Oh, I see. That is not yet supported. Here, I got the structure in debuginfo. [ fac4e] structure_type name (strp) "ins_operands" byte_size (data1) 64 decl_file (data1) 5 decl_line (data1) 16 sibling (ref4) [ fac79] [ fac5a] member name (string) "raw" decl_file (data1) 5 decl_line (data1) 17 type (ref4) [ f8bdb] data_member_location (data1) 0 [ fac66] member name (strp) "target" decl_file (data1) 5 decl_line (data1) 23 type (ref4) [ fab9c] data_member_location (data1) 8 [ fac72] member <= here is the unnamed one type (ref4) [ fac7f] data_member_location (data1) 28 [ fac79] pointer_type byte_size (data1) 8 type (ref4) [ fac4e] [ fac7f] union_type byte_size (data1) 24 decl_file (data1) 5 decl_line (data1) 24 sibling (ref4) [ fac9e] [ fac87] member name (strp) "source" decl_file (data1) 5 decl_line (data1) 29 type (ref4) [ fabd5] [ fac92] member <= here is actual member name (strp) "locked" decl_file (data1) 5 decl_line (data1) 33 type (ref4) [ fac02] Let me see how I can solve this... Thank you for reporting! > > - Arnaldo > -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com