From mboxrd@z Thu Jan 1 00:00:00 1970 From: Genevieve Bastien via lttng-dev Subject: Re: Correctly using callstack-user context Date: Wed, 13 May 2020 10:02:04 -0400 Message-ID: References: <1486835767.11198.1589286441675.JavaMail.zimbra@efficios.com> Reply-To: Genevieve Bastien Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2221153782573968286==" Return-path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by lists.lttng.org (Postfix) with ESMTPS id 49McGP7295z21tc for ; Wed, 13 May 2020 10:18:21 -0400 (EDT) Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id MCO6rLzHtrvLPmE4 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 13 May 2020 10:02:04 -0400 (EDT) Received: from [192.168.47.170] (unknown [104.163.172.174]) by smtp.ebox.ca (Postfix) with ESMTPS id 46AEB441B21 for ; Wed, 13 May 2020 10:02:04 -0400 (EDT) In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org This is a multi-part message in MIME format. --===============2221153782573968286== Content-Type: multipart/alternative; boundary="------------030E079F2CB96675849F32D4" Content-Language: en-US This is a multi-part message in MIME format. --------------030E079F2CB96675849F32D4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Christophe, On 5/13/20 9:42 AM, Christophe B=C3=A9dard via lttng-dev wrote: > > On Tue, 12 May 2020 at 08:27, Mathieu Desnoyers > > wrote: > > How does your test program issue the system call ? Is it directly > with syscall() (see syscall(2) man page), or > does it call into libc ? Is your entire libc compiled with > -fno-omit-frame-pointer ? > > > Indirectly, through libc/libstdc++. We use the default system libs > (which I assume use -O, which in turn implies -fomit-frame-pointer). > =C2=A0 > > As soon as one library in the chain to the system call is compiled > without frame pointers, this is where the > stack walk stops. This is usually libc. > > > I see. Thanks for the information. Not sure we want to ship a custom > libc unfortunately. > > Related question: how feasible would adding the callstack-user context > to userspace=C2=A0events be? If it is feasible, is such a feature plann= ed? We had a very very experimental branch with it, using backtrace first, then unwind. But it is not suggested, not performant. It's far from the correct desired implementation, for which Mathieu could give more details= =2E It works, but not to be used in production. Students have used it in the lab for some specific use case prototyping. I won't share the branch here, but if you wish to try, let me know. Genevi=C3=A8ve --------------030E079F2CB96675849F32D4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi Christophe,

On 5/13/20 9:42 AM, Christophe Bédard via lttng-dev wrote:

On Tue, 12 May 2020 at 08:27, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
How does your test program issue the system call ? Is it directly with syscall() (see syscall(2) man page), or
does it call into libc ? Is your entire libc compiled with -fno-omit-frame-pointer ?

Indirectly, through libc/libstdc++. We use the default system libs (which I assume use -O, which in turn implies -fomit-frame-pointer).
 
As soon as one library in the chain to the system call is compiled without frame pointers, this is where the
stack walk stops. This is usually libc.

I see. Thanks for the information. Not sure we want to ship a custom libc unfortunately.

Related question: how feasible would adding the callstack-user context to userspace events be? If it is feasible, is such a feature planned?

We had a very very experimental branch with it, using backtrace first, then unwind. But it is not suggested, not performant. It's far from the correct desired implementation, for which Mathieu could give more details.

It works, but not to be used in production. Students have used it in the lab for some specific use case prototyping. I won't share the branch here, but if you wish to try, let me know.

Geneviève


--------------030E079F2CB96675849F32D4-- --===============2221153782573968286== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============2221153782573968286==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B4ADCA90AF for ; Wed, 13 May 2020 14:18:25 +0000 (UTC) Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 93B31204EF for ; Wed, 13 May 2020 14:18:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.lttng.org header.i=@lists.lttng.org header.b="Vnh7203u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93B31204EF Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.lttng.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lttng-dev-bounces@lists.lttng.org Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 49McGR228cz21m7; Wed, 13 May 2020 10:18:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1589379503; bh=A62pW9Td6VaJhsEmBSvYhQHRki78Eqxas7tiC4LK25k=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Vnh7203ugPvXjHRI/tg7tDXSq/We1IiEABGg9eiPiYoOLPwaDzsUqM5ja+O8FXpo2 w0JeKHwDbdDEp9YjztC8aRLYOEUeYGh1BNSq10Qnd1DJhfx7AHSMtuyjorXV1OT5FS sOz9Oe10HRLofTrU50k2NngmXid2T3IIAT/yh8q44Gusgb7mJGwFzlQgXzk4ImctwJ jOBnJdEP+NJ7Ehr5+z4jm/hF1nCGlRnBMUcADNSFwzeGTJymHEoDD/ktJ8ElFivcRD Kuml7wq/rtq9HtZKnYbnLjcwgGcaYK7C1cxWXii+1s3lvoxoRCT72JLQi7t9POLDDp hykenJVDboExg== Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by lists.lttng.org (Postfix) with ESMTPS id 49McGP7295z21tc for ; Wed, 13 May 2020 10:18:21 -0400 (EDT) X-ASG-Debug-ID: 1589378524-0c856e18f31459420001-YyuIcB Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id MCO6rLzHtrvLPmE4 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 13 May 2020 10:02:04 -0400 (EDT) X-Barracuda-Envelope-From: gbastien@versatic.net X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from [192.168.47.170] (unknown [104.163.172.174]) by smtp.ebox.ca (Postfix) with ESMTPS id 46AEB441B21 for ; Wed, 13 May 2020 10:02:04 -0400 (EDT) X-Barracuda-RBL-IP: 192.168.47.170 To: lttng-dev@lists.lttng.org X-ASG-Orig-Subj: Re: [lttng-dev] Correctly using callstack-user context References: <1486835767.11198.1589286441675.JavaMail.zimbra@efficios.com> Autocrypt: addr=gbastien@versatic.net; prefer-encrypt=mutual; keydata= xsFNBFBOneQBEACmVKsSR9YiWFJuUI5qFPMHh11O3aHBjxsVXIcPchi/FJF9ZB4rOaQ4cbVq AOFD4wftjWl5cZE6SwQS+IsCB3QjaJvq/hQsSgwW959PllZ266/yW7G8f77si2g9NeK+u5NB EwNCTLcai6VPjHXpXvWD0s9oeD5RuEK5qRjAjne7D1F/vpDEzfolc8ZIYkTp+eQ7gwgqSoei z9qPObes8fg6l/zB+vsOu2L5DE8/2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oJSyuY Xc/CjgJlEEhgt1VcbLg/T+t6WVlFHjOTm7nTv8lxdGH7lKUnY5rJnk7i6zUNlTvFLVj2ViCG eLy2TH1rXXapzhLJC6v0jFDdNGp7fkNXIk43jPDhJlnxVX/tk3Ei3YAc/oyVQLIpclzIw5Gw HTrkdLELk1NfCcwKRdX4QwgNla3ET5C7esMw7bSe9uInJ+vjIT+gUDXg2tvV395VBPkxLY0q wGzB9K3KGs15l26gYwR6pMU/eBNKDvtu36uaOag2VYBmPGNBeiYeDbkkZa0XEUe3uYJCvzYG yv1+oZzYIzG+S3yajyabLxCzrrBSbTq4E7H4PWQaNRNwu2e5bkEaLPoKe0fs8QFhxgSDxO7c YuYS6SoFlTty1qeoSFE9pt4W23jeb/HrL8X97z4wtVyP3UH54mWEcvf8x+8tFxEmEGVgIVej kG/oiDeqPppSyEntBFyIA8W6bI6ofAbNq7UczXoHYok0mXjqX5wxEIRmnbP1YLe8iJXLFGpG fr9j2ZfZJE00EQLC9aDUOB2JAntwjkQTPXXBKvDuiPJujg5BeVuvq5exiixKOlRdixeivez2 a8tabjukNOPcem4ySQMBoh4jpoHcd0YOF+jTL0SPlGaq4PMm+Wl8cxakWYJio09E9HaP+V7b jvgrBQ== Message-ID: Date: Wed, 13 May 2020 10:02:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1589378524 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 4859 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.81822 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Subject: Re: [lttng-dev] Correctly using callstack-user context X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.31 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Genevieve Bastien via lttng-dev Reply-To: Genevieve Bastien Content-Type: multipart/mixed; boundary="===============2221153782573968286==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" Message-ID: <20200513140204.wv2d2vM8fYlsWZYn-KChQ5BqcXK3V3B-6eGE2INacDo@z> This is a multi-part message in MIME format. --===============2221153782573968286== Content-Type: multipart/alternative; boundary="------------030E079F2CB96675849F32D4" Content-Language: en-US This is a multi-part message in MIME format. --------------030E079F2CB96675849F32D4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Christophe, On 5/13/20 9:42 AM, Christophe B=C3=A9dard via lttng-dev wrote: > > On Tue, 12 May 2020 at 08:27, Mathieu Desnoyers > > wrote: > > How does your test program issue the system call ? Is it directly > with syscall() (see syscall(2) man page), or > does it call into libc ? Is your entire libc compiled with > -fno-omit-frame-pointer ? > > > Indirectly, through libc/libstdc++. We use the default system libs > (which I assume use -O, which in turn implies -fomit-frame-pointer). > =C2=A0 > > As soon as one library in the chain to the system call is compiled > without frame pointers, this is where the > stack walk stops. This is usually libc. > > > I see. Thanks for the information. Not sure we want to ship a custom > libc unfortunately. > > Related question: how feasible would adding the callstack-user context > to userspace=C2=A0events be? If it is feasible, is such a feature plann= ed? We had a very very experimental branch with it, using backtrace first, then unwind. But it is not suggested, not performant. It's far from the correct desired implementation, for which Mathieu could give more details= =2E It works, but not to be used in production. Students have used it in the lab for some specific use case prototyping. I won't share the branch here, but if you wish to try, let me know. Genevi=C3=A8ve --------------030E079F2CB96675849F32D4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi Christophe,

On 5/13/20 9:42 AM, Christophe Bédard via lttng-dev wrote:

On Tue, 12 May 2020 at 08:27, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
How does your test program issue the system call ? Is it directly with syscall() (see syscall(2) man page), or
does it call into libc ? Is your entire libc compiled with -fno-omit-frame-pointer ?

Indirectly, through libc/libstdc++. We use the default system libs (which I assume use -O, which in turn implies -fomit-frame-pointer).
 
As soon as one library in the chain to the system call is compiled without frame pointers, this is where the
stack walk stops. This is usually libc.

I see. Thanks for the information. Not sure we want to ship a custom libc unfortunately.

Related question: how feasible would adding the callstack-user context to userspace events be? If it is feasible, is such a feature planned?

We had a very very experimental branch with it, using backtrace first, then unwind. But it is not suggested, not performant. It's far from the correct desired implementation, for which Mathieu could give more details.

It works, but not to be used in production. Students have used it in the lab for some specific use case prototyping. I won't share the branch here, but if you wish to try, let me know.

Geneviève


--------------030E079F2CB96675849F32D4-- --===============2221153782573968286== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============2221153782573968286==--