Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp794240ybb; Wed, 25 Mar 2020 09:42:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vssuF9EvGL3793gBS3TV2VYBm2F42/yQ6lOW76/tyhY+3HQiRmd9hY2fZKZYgV7ZfI6L2if X-Received: by 2002:a54:4d03:: with SMTP id v3mr3197715oix.177.1585154564523; Wed, 25 Mar 2020 09:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585154564; cv=none; d=google.com; s=arc-20160816; b=ikVryDGpUkZ9iLMcOP27JsGvEyAq7XUQmbRSPQqEiVL2WXVAAYoofM7wQwBTNJQVMd 3IuJCn0WrO2gdcxy9o6ctSXJaJSCt5br6Y98EQWuiOzEdVQsO8eIS5V4nyCekn7z9gFs xjNjcRpL/3GmCFPIOe23Y7BOcYZriwoMjZwgfRxBhn5e2VnLMtijQI1KMwoDIUtrypLG zHOCS4/xPyG9Yadtdl6+SlguB6K0t+k1Rv/jE5XjgJHb+XHEfl3UajrOVfpH0q8yuwYF iCgvctPVWzMxrmWi8JOt6GOBJAPEyK1+hUjTy6PVcjerYLOosG467Ag7XJ3qJNXo6hRT yVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aTe4oUSAL0iR1i1UOQwkLUzxdJzwF0HoI2jP8nKJTEY=; b=JRyV6IfOHlDYAFlNbvN7RYKucVNH2OPK3d5CKgur6x3QutQUIeWSQ+9tmqNIQORaWZ pRdQrNrKBEOKbKhG8JRSx12UDKMvMmEh6q/ZT7+ucXSHZ3rN2FMIBUlVCMnobrEMEWDS OA7ru4N6Ci4TsG4RPrvZM8v1eRfWqPVNaHwqoP7HqPnwo2YsdZMfuxfkmaN9RzijnvDz /g/m4odStr5dHsp3PjhtFmXusm+hfIqxO1F4/AC8woJl1eYDIOdGZhX6qoBkYqXBkG5m YTp8BYMn4atExDNJJjZ8/u4c9snZyL3eHhwQINMsHH3CAG6HIXMe4Nt6h7pA4T5FidKE +l8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si7040809otd.64.2020.03.25.09.42.30; Wed, 25 Mar 2020 09:42:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbgCYQlB (ORCPT + 99 others); Wed, 25 Mar 2020 12:41:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:40292 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727281AbgCYQk7 (ORCPT ); Wed, 25 Mar 2020 12:40:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1CC27AC79; Wed, 25 Mar 2020 16:40:57 +0000 (UTC) From: Tony Jones To: linux-perf-users@vger.kernel.org Cc: Tony Jones , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Subject: [PATCH] perf tools: update docs regarding kernel/user space unwinding Date: Wed, 25 Mar 2020 09:40:53 -0700 Message-Id: <20200325164053.10177-1-tonyj@suse.de> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The method of unwinding for kernel space is defined by the kernel config, not by the value of --call-graph. Improve the documentation to reflect this. Signed-off-by: Tony Jones --- tools/perf/Documentation/perf-config.txt | 14 ++++++++------ tools/perf/Documentation/perf-record.txt | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config.txt index 8ead55593984..88cf35fbedc5 100644 --- a/tools/perf/Documentation/perf-config.txt +++ b/tools/perf/Documentation/perf-config.txt @@ -405,14 +405,16 @@ ui.*:: This option is only applied to TUI. call-graph.*:: - When sub-commands 'top' and 'report' work with -g/—-children - there're options in control of call-graph. + The following controls the handling of call-graphs (obtained via the + -g/--callgraph options). call-graph.record-mode:: - The record-mode can be 'fp' (frame pointer), 'dwarf' and 'lbr'. - The value of 'dwarf' is effective only if perf detect needed library - (libunwind or a recent version of libdw). - 'lbr' only work for cpus that support it. + The mode for user space can be 'fp' (frame pointer), 'dwarf' + and 'lbr'. The value 'dwarf' is effective only if libunwind + (or a recent version of libdw) is present on the system; + the value 'lbr' only works for certain cpus. The method for + kernel space is controlled not by this option but by the + kernel config (CONFIG_UNWINDER_*). call-graph.dump-size:: The size of stack to dump in order to do post-unwinding. Default is 8192 (byte). diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index 7f4db7592467..b25e028458e2 100644 --- a/tools/perf/Documentation/perf-record.txt +++ b/tools/perf/Documentation/perf-record.txt @@ -237,16 +237,22 @@ OPTIONS option and remains only for backward compatibility. See --event. -g:: - Enables call-graph (stack chain/backtrace) recording. + Enables call-graph (stack chain/backtrace) recording for both + kernel space and user space. --call-graph:: Setup and enable call-graph (stack chain/backtrace) recording, - implies -g. Default is "fp". + implies -g. Default is "fp" (for user space). - Allows specifying "fp" (frame pointer) or "dwarf" - (DWARF's CFI - Call Frame Information) or "lbr" - (Hardware Last Branch Record facility) as the method to collect - the information used to show the call graphs. + The unwinding method used for kernel space is dependent on the + unwinder used by the active kernel configuration, i.e + CONFIG_UNWINDER_FRAME_POINTER (fp) or CONFIG_UNWINDER_ORC (orc) + + Any option specified here controls the method used for user space. + + Valid options are "fp" (frame pointer), "dwarf" (DWARF's CFI - + Call Frame Information) or "lbr" (Hardware Last Branch Record + facility). In some systems, where binaries are build with gcc --fomit-frame-pointer, using the "fp" method will produce bogus -- 2.25.0