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=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 DFC1AC4743C for ; Mon, 14 Jun 2021 16:21:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC2606128C for ; Mon, 14 Jun 2021 16:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234605AbhFNQXR (ORCPT ); Mon, 14 Jun 2021 12:23:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233044AbhFNQXQ (ORCPT ); Mon, 14 Jun 2021 12:23:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1CA64613D0; Mon, 14 Jun 2021 16:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623687673; bh=cRIYdUmqM08o9AcSwmE0jOf990hB3Rb6ZtDqmtlY5AA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=IfFII17KCvYNObVx26XraIumREsHtBht3mBm7UQyrYauo70CNGnMkpqjOGfCd61Dd ybpuYNE5P5nMMtIS4srXcSM/g/nC09ycnX0L+v7077sx+iVvlAQcQPbsVCaEJIbZKE n5kbAhaANneAEtAJsZ1PfyUoA3MuvbttT8fBntjIp1bXy/m26ayUXML7e2Hz6R93iz LdkbqQ49scutBqkfKPeG+hpfbE11LJaJ/jnfo3wPBUyFmyK2gj/gnJDRZgRrhgS7Sl 9kP+sNvifMlaKUykezjg78kJFiEorizfWq98ug1oFvkrIASfVuW+f2msNHDmz72zRa fRV038j4wyjOQ== Subject: Re: [PATCH] x86: fix get_wchan() not support the ORC unwinder To: Qi Zheng , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, peterz@infradead.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, songmuchun@bytedance.com References: <20210611124642.72910-1-zhengqi.arch@bytedance.com> From: Andy Lutomirski Message-ID: <06292162-5a44-6f91-140d-e1211c006ad0@kernel.org> Date: Mon, 14 Jun 2021 09:21:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210611124642.72910-1-zhengqi.arch@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/11/21 5:46 AM, Qi Zheng wrote: > Currently, the kernel CONFIG_UNWINDER_ORC option is enabled by > default on x86, but the implementation of get_wchan() is still > based on the frame pointer unwinder, so the /proc//wchan > always return 0 regardless of whether the task is running. > > We reimplement the get_wchan() by calling stack_trace_save_tsk(), > which is adapted to the ORC and frame pointer unwinders. How much slower does this make ps? --Andy