From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756338AbbCEPc7 (ORCPT ); Thu, 5 Mar 2015 10:32:59 -0500 Received: from mail.kernel.org ([198.145.29.136]:50159 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932173AbbCEPc5 (ORCPT ); Thu, 5 Mar 2015 10:32:57 -0500 Date: Thu, 5 Mar 2015 12:32:56 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: David Ahern , Linux Kernel Mailing List Subject: perf probe: can't find unnamed union members Message-ID: <20150305153256.GX5187@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 :-) - Arnaldo