From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111460 invoked by alias); 10 Jul 2015 22:59:12 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 111452 invoked by uid 89); 10 Jul 2015 22:59:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Jul 2015 22:59:11 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id D84AB388851; Fri, 10 Jul 2015 22:59:09 +0000 (UTC) Received: from [10.3.113.194] (ovpn-113-194.phx2.redhat.com [10.3.113.194]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6AMx90I026279; Fri, 10 Jul 2015 18:59:09 -0400 Subject: Re: process().statement() doesn't seem to work To: "Frank Ch. Eigler" References: <558DA0E3.9060904@linaro.org> <5591D73E.3010309@redhat.com> Cc: Zoltan Kiss , systemtap@sourceware.org From: Josh Stone Message-ID: <55A04E3D.4060207@redhat.com> Date: Fri, 10 Jul 2015 22:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-q3/txt/msg00034.txt.bz2 On 07/09/2015 07:50 AM, Frank Ch. Eigler wrote: > > jistone wrote: > >> [...] The behavior of .return variables is often suprising to >> people. [...] But we cheat a little and also save values from the >> *entry* of the function for you. That's most useful for the $$parms >> string or any of the individual parameters. [...] > > Should we deprecate this behavior, now that the superceding @entry() > construct is itself quite old? As in, make .return $var an error and require explicit @entry($var) ? @entry is inferior in one important way: it doesn't know the type of the thing being saved until later, in the type resolution phase. We might be able to shortcut this for special cases, including $var, but a general expression could end up as a string or a long. For instance, in dwarf_var_expanding_visitor::visit_entry_op it must always use gen_mapped_saved_return, with a global map and all the indexing and locking that entails, rather than the nicer kretprobe data pouch via gen_kretprobe_saved_return. Maybe that could be redesigned to not care about the type so soon, but for now it needs to know up front. The autocast dwarf types also fail through @entry, PR18579. https://sourceware.org/bugzilla/show_bug.cgi?id=18579