Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp917811pxk; Thu, 10 Sep 2020 02:00:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDRD6WvD5PMo2o5C0rdrND4dycoLbNO3SiT0uupIAqgnByQvatfwS2byXjjt+OzACDt/SA X-Received: by 2002:aa7:d353:: with SMTP id m19mr7876053edr.275.1599728411215; Thu, 10 Sep 2020 02:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599728411; cv=none; d=google.com; s=arc-20160816; b=at/ybEWns/2TiLY2AceQT0a/gRRIlySE7ew/AhFJJYJ2ATv8iDxdIKaS3Y8HXzzgTn tczGH/BKmxydT1+SQu9MX+/vQizN1pR3A3iVfnYprVQzt3o17JgQBiUug2QgasWYqACM /qOKXcbiDPMztNMB0pA32glJ5MVJKyM75ZX7e9/IJOQfoRBwc+Hjs3AMO/ylkDL4WsiF 3xYGQYwcX3yRgZDTqkIdRBQXd4SLqIwyzB9+IsES93dnA+JvKZkfQ3f87OwTxbFyh2Sx nd8zy37Pe1f5TDct45CgUxR5qWImj0tUI6DGdC/GKemd2cCD+nAKmzbwq2q4HrVSsNpw l0lw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PBHRDsIiZIxwpfOn3nTpCeNHTwgp5YrWRpIdo9XU6ps=; b=0JXxXPb9Qn7IZuU3I2sZz4fW6bOkzab1AR2hK54LJWhZXb8b38Ww4+5M4Tkz5sa1fB V83IzKIEUwFxHvDlJbnDkbfxvstUDuf3TLiWehm0+4Gwr+gTg+echMZdxtF0N9ueTYV9 FKmta9UHdfMTQP9DYUa8gAPwOME/SglHv2QfR3zHP1IthMqWVcUxtm8H15Z1nGqVM7bs z3xfxvQdvQpNO+Lu+p2j4ZpZ6EES2t1zU+nfZmTiy88a2CqybtHH/f2w9W9cP4eyeyar esZkY7QFZHtLaUh3gjmzPxXZUTj6NUklfz1PTXPuYvDZw+wjonyZF6bVI3EJXfmusHXu x4dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vv8tcQe7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf27si3158809edb.506.2020.09.10.01.59.48; Thu, 10 Sep 2020 02:00:11 -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=@kernel.org header.s=default header.b=Vv8tcQe7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730547AbgIJI6q (ORCPT + 99 others); Thu, 10 Sep 2020 04:58:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:37314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730270AbgIJI4L (ORCPT ); Thu, 10 Sep 2020 04:56:11 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF4E121556; Thu, 10 Sep 2020 08:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599728171; bh=AFTvUebiyRMETzn8S38/k45wbiUemiQHqeohzIX/Qck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vv8tcQe7zv9uk+l9UZSlOvvWpTivIwZNWMyeR0Ille5GxORiu664nMpGfDbIcVHQv OgST9iaJ8E/CChyDqbRK0FSwFbF4+aDxaFi4W+txB/8/VxXuTC9goVeeYtxZMOW5+X dpUfQtZrGEqojNdN1MkxQ5QXmJLB8ajjY9VZ3VKE= From: Masami Hiramatsu To: Steven Rostedt , Jonathan Corbet , Shuah Khan Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Randy Dunlap , Ingo Molnar , linux-kselftest@vger.kernel.org Subject: [PATCH v3 7/8] Documentation: tracing: boot: Add an example of tracing function-calls Date: Thu, 10 Sep 2020 17:56:06 +0900 Message-Id: <159972816669.428528.12390560334549382316.stgit@devnote2> X-Mailer: git-send-email 2.25.1 In-Reply-To: <159972809455.428528.4737752126800169128.stgit@devnote2> References: <159972809455.428528.4737752126800169128.stgit@devnote2> User-Agent: StGit/0.19 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 Add an example of tracing function calls on a specific function. Signed-off-by: Masami Hiramatsu --- Documentation/trace/boottime-trace.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/trace/boottime-trace.rst b/Documentation/trace/boottime-trace.rst index 1341b449acaa..c216f5695ae2 100644 --- a/Documentation/trace/boottime-trace.rst +++ b/Documentation/trace/boottime-trace.rst @@ -168,6 +168,26 @@ is for tracing functions starting with "user\_", and others tracing The instance node also accepts event nodes so that each instance can customize its event tracing. +With the trigger action and kprobes, you can trace function-graph while +a function is called. For example, this will trace all function calls in +the pci_proc_init():: + + ftrace { + tracing_on = 0 + tracer = function_graph + event.kprobes { + start_event { + probes = "pci_proc_init" + actions = "traceon" + } + end_event { + probes = "pci_proc_init%return" + actions = "traceoff" + } + } + } + + This boot-time tracing also supports ftrace kernel parameters via boot config. For example, following kernel parameters::