From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id F292F3858D28 for ; Mon, 8 May 2023 21:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F292F3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683582638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UQ1IWN3nl0j414RsOxBF20xelgjJXYkPRFvmYdWIleg=; b=Hk7wgYQLXLKCErJjy5B1sU0xQtBXvu/E00Eb5VVEjCWkZc1SCFxYNMG+08GsGFuk63ANxa hZIqG9sQp5/j8JwzPKxY8q9FhIVx/ep6npSaRTfDRjGnE7WGLxSnfHZw1btXks1SuYUUvb +JRQ1mNhsLB6+W8B+I2xLH0xSPjfR4g= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-237-TzThNWiWMjyRG__LHxI6qA-1; Mon, 08 May 2023 17:50:37 -0400 X-MC-Unique: TzThNWiWMjyRG__LHxI6qA-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-24de504c5fcso5018069a91.2 for ; Mon, 08 May 2023 14:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683582636; x=1686174636; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UQ1IWN3nl0j414RsOxBF20xelgjJXYkPRFvmYdWIleg=; b=iRwpFJNTkhj4K8Ke5tzdHuSuwEVanMgGsrnPWCbbGqov7y06fZCP/rSp65VeF12GfY d6hBv+Chs5CwrNClTLsEzYPvjUQRDeZQemIz9sT8rptN1eTzjdMxvB+9lf3GQhqjbgKi vgwMY4T71a8GYZMftI10RuS9Sp2O7IZ14tlpzXI6FtOqZPFYHlPop17Nuu09Y6beY1jX tgzRATw47angihElJtcvfKOEkpYJUNhVLEbIfl3TU6sXTqCxDVjtvCxVCuDouB77YsWm nk13psmpVuzUkxCr9Dew+RSENsN+m2n7TQTkqPeIcQEmUUY/+LcjRbgoVu8DMK08mw42 i8tg== X-Gm-Message-State: AC+VfDyxnSwi9eN/W+MnHxKyz0g1UNePW4v5OlRdGPEVD5Bluwqbld1V +mVKjVg2s3Vtqtilmd9tWf+bYmWjrG5KiTd7b9CjUGtsnu3dbglRpxF1fJy8yaU/z/xMYSmVCZV 8JU2BlHW/IGfHWiMdROWlCJ1MobzWYYpFlw== X-Received: by 2002:a17:902:efc5:b0:19c:f096:bbef with SMTP id ja5-20020a170902efc500b0019cf096bbefmr11086611plb.49.1683582635999; Mon, 08 May 2023 14:50:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gFYaBVy7VPlfEZ2ixvECg++qvfa7ZIqKA212+dup2MSETMzMrYXUNmkvWWQUjocQARXgECQ== X-Received: by 2002:a17:902:efc5:b0:19c:f096:bbef with SMTP id ja5-20020a170902efc500b0019cf096bbefmr11086603plb.49.1683582635691; Mon, 08 May 2023 14:50:35 -0700 (PDT) Received: from [192.168.0.4] ([75.164.30.253]) by smtp.gmail.com with ESMTPSA id a21-20020a170902ee9500b001a934af187esm5268839pld.153.2023.05.08.14.50.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 14:50:35 -0700 (PDT) Message-ID: Date: Mon, 8 May 2023 14:50:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: eu-stacktrace: roadmap and discussion thread To: Serhei Makarov , elfutils-devel@sourceware.org Cc: fche@elastic.org, mark@klomp.org References: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> From: Christian Hergert In-Reply-To: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: First off, this all sounds great! I'm not on the mailing list, so apologies if this takes extra-effort to show up there. On 5/8/23 5:33 AM, Serhei Makarov wrote: > eu-stacktrace will be a utility to process a stream of raw stack > samples (such as those obtained from the Linux kernel's > PERF_SAMPLE_STACK facility) into a stream of stack traces (such as the > ones obtained from PERF_SAMPLE_CALLCHAIN), freeing various profiling > utilities from having to implement their own backtracing logic. From a consumption standpoint, it would be nice if Sysprof could get a perf stream where the PERF_SAMPLE_STACK are transparently converted to PERF_SAMPLE_CALLCHAIN. I don't think eu-stacktrace necessarily needs to speak Sysprof's capture API. Sysprof already contains `sysprofd` which can open the Perf event stream for us via d-bus/CAP_SYS_ADMIN/polkit integration. After Sysprof gets the perf FD back from sysprofd we could spawn eu-stacktrace giving it the FD to consume and another FD to write the translated/passthrough events. Sysprof can do offline symbolizing of frames which is somewhat important when trying to analyze profiles from an embedded device, a machine that is disk/network constrained, or end-user-system via bug reports. We can fairly trivially teach Sysprof to do symbolizing via debuginfod. In the case you're describing, is it right that you may not be able to unwind stack frames without debuginfod because there was no way to locate the `.eh_frame` section for the binary? The code to do the mount namespace conversion is quite terrible in Sysprof and even now I'm in the midst of cleaning it up. We have to both create a "view" of the namespace as it was to the PID as well as a way to convert that view into something the mount namespace analyzing the capture file might be able to open. Any of these may or may not be in a rootless container (toolbox/podman/flatpak/etc). Whether or not this is something we can eventually contain inside of bubblewrap is another can of worms. Thanks again for all your work on this, I'm very excited to see what we can come up with! -- Christian