Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp575285pxb; Thu, 21 Oct 2021 05:31:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGf1aMf4mmNXN9xyBWcXcyWQoQ5oDR63C00UvqdvQ1WF+AU20mJFIrZOc1MUKeNALr4RrZ X-Received: by 2002:a17:907:77c8:: with SMTP id kz8mr6921002ejc.188.1634819511197; Thu, 21 Oct 2021 05:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634819511; cv=none; d=google.com; s=arc-20160816; b=0ZjWQ0Ojs9lTg2yTmJ79YUqYzIl83eDuDYI/Ssn0YP1A8N0VSDRHl6GjF/Xjooj+k1 ZsKsCG4MOZUf0er8l/vN2oMgBUih/hNhlUL2nNLg6Dw7QskMC4xQqRvoVS1FspLTSS+C c110ox2c6vhuFJR8BYoGvjmONgwLY5sBD/Juj0QwlJe4X72u6pFu/SlT5T8mp2Bpnkhq ZvXoBOlh6jXglDP+jmYFbGiDn6JgiPb6aULw/ZisZjzDXbhN7huI8HpVPI0Pwiw6iHWg BhGpbnT6YlxeMuMis4FM1Rqmv1NbcRHAv7r14cgqquXmr+dKZcfvVynmGAUloqA+S32z 1ANA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=DvHvI1eWTe/g+Ehqlznt9wtXs8WUeiscbm6lpSkMErM=; b=W8r+5hP9C7wxC2ky0Ot6CsceGGEPgvqTFo/ZB/20nuxxAAMUcGkCLGMb3tGkZtXlrp I15KAk4/Bb+Wan+0axS9dtSck89BeIgCnQSCUp/A+79jKUmSI073p7YFTRwjEgyyCTxT bPDYYogzUUkFrXH7gPVsPq/u9rENbqN1C8FIhU/zVAUZmly4XkuOkjI7i3KyfFOG3OGX 5fMFEjnHaW4be2hJL69l+aqWIijD4i0VAA3hPjlkfsHzjSlHrg0u/LaU3ohaMWx7onhK yi1XDNbchjXNWqFUALPtt2+Mv2HHEss+QtRXuH7rs0C6Z2tdyTzL5XIMmRCHa0xTUw0R STog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=YSvX7YSp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la20si955099ejc.601.2021.10.21.05.31.26; Thu, 21 Oct 2021 05:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=YSvX7YSp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231717AbhJUMbI (ORCPT + 99 others); Thu, 21 Oct 2021 08:31:08 -0400 Received: from linux.microsoft.com ([13.77.154.182]:49836 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231787AbhJUMbE (ORCPT ); Thu, 21 Oct 2021 08:31:04 -0400 Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id CFC5B20B7179; Thu, 21 Oct 2021 05:28:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CFC5B20B7179 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1634819328; bh=DvHvI1eWTe/g+Ehqlznt9wtXs8WUeiscbm6lpSkMErM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YSvX7YSp4lwVxBlBM7o1zYZkCVrYuVhEO5iffMK7XhMMsFOtArvrvEjKUh+5fESNo ptiYAPdNHWleVi3nZ6fKVNDOMrm7hIzZHgZUfmnp4e6z1DTA407wINSW0a+ie7Ap9N UQU5dlSnzi/eWefqupMNyY/ubH+Ob5KgJbdV/K0Y= Subject: Re: [PATCH v10 02/11] arm64: Make perf_callchain_kernel() use arch_stack_walk() To: Mark Brown Cc: mark.rutland@arm.com, jpoimboe@redhat.com, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211015025847.17694-1-madvenka@linux.microsoft.com> <20211015025847.17694-3-madvenka@linux.microsoft.com> From: "Madhavan T. Venkataraman" Message-ID: Date: Thu, 21 Oct 2021 07:28:46 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/21 9:59 AM, Mark Brown wrote: > On Thu, Oct 14, 2021 at 09:58:38PM -0500, madvenka@linux.microsoft.com wrote: >> From: "Madhavan T. Venkataraman" >> >> Currently, perf_callchain_kernel() in ARM64 code walks the stack using >> start_backtrace() and walk_stackframe(). Make it use arch_stack_walk() >> instead. This makes maintenance easier. > >> static bool callchain_trace(void *data, unsigned long pc) >> { >> struct perf_callchain_entry_ctx *entry = data; >> - perf_callchain_store(entry, pc); >> - return true; >> + return perf_callchain_store(entry, pc) == 0; >> } > > This changes us from unconditionally doing the whole walk to returning > an error if perf_callchain_store() returns an error so it's not quite a > straight transform, though since that seems like a useful improvement > which most likely on't have any practical impact that's fine. > > Reviewed-by: Mark Brown > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > Thanks. Madhavan