From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B4C52BE639 for ; Sat, 4 Apr 2026 02:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775269534; cv=none; b=aU9V0QsdjOff/3sOXMhaKw84+XlhZGv4W6/X/RDRpD/4JW2zIN1PtJR9fOegIKSUp8v5G/bkvekMTVwZLOQJ5uzJzEZN5IcgKo5YW+yBl72GjAQDWXg/hX8dI5bJnt1AJlWIKeE0PY6IYz97hYSGQZvGy1nfaFSiMx0EDxL5bo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775269534; c=relaxed/simple; bh=UTz0hADeyOa52+IenGEb2Z21TkD+5Ro8LZ15cJFEcfU=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=lcfHx6ECNROF8CZIHeqFc2nVz0pSyWT1hmdblgmZdVg+7PZ6fxKGK9gdhxJyNQj1NeaKh2pTqM4B2SBesOSSOc5Vpj0yEfUhUYJCfHLRt7EOK0Eu4ug30RaA3Z+piEsaC2E3RY2vMOo/7O6x00tfTht0o+LFpZYR9HXZf+293ec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UrcOy2jB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UrcOy2jB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1A49C19421; Sat, 4 Apr 2026 02:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775269534; bh=UTz0hADeyOa52+IenGEb2Z21TkD+5Ro8LZ15cJFEcfU=; h=Date:From:To:Cc:Subject:References:From; b=UrcOy2jBiwjDXUybtQtFUkAA3sf0ev6gD7kD4fpXAWCngJobfNqZvlPA0RPQdJA8G hBWmGtggngcuA2gtjhUBoIO7t4N5surSkYDIaQaIrEq+9T6vouEoh6I6FLOkc3WZFE NU50OREGZ7fZ6mTZE8fORHEpWO7FmMDPHg2+7o6FZKAL7ER8tv8Qp9LYQY5aini/MN UAEKVYjQ3EVtXILHWS0fR1bwP2ghPP0ubNZxY/ccSQlTTB1JTzWERUKp/lM8kyMNoR Fm9ysqlsJHK0B3F+5cHgSYJOsMR06CalVWQA00+UpirULkpy+AzW8lHadLabJ/hcus DkAGBc35nrUPQ== Received: from rostedt by gandalf with local (Exim 4.99.1) (envelope-from ) id 1w8qie-0000000165z-1GFH; Fri, 03 Apr 2026 22:26:40 -0400 Message-ID: <20260404022640.180611561@kernel.org> User-Agent: quilt/0.69 Date: Fri, 03 Apr 2026 22:26:22 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-next][PATCH 5/6] tracing/Documentation: Add a section about backup instance References: <20260404022617.436859059@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: "Masami Hiramatsu (Google)" Add a section about backup instance to the debugging.rst. Cc: Mathieu Desnoyers Link: https://patch.msgid.link/177502548479.1311542.7062269603547001007.stgit@mhiramat.tok.corp.google.com Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- Documentation/trace/debugging.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/trace/debugging.rst b/Documentation/trace/debugging.rst index 4d88c346fc38..bca1710d92bf 100644 --- a/Documentation/trace/debugging.rst +++ b/Documentation/trace/debugging.rst @@ -159,3 +159,22 @@ If setting it from the kernel command line, it is recommended to also disable tracing with the "traceoff" flag, and enable tracing after boot up. Otherwise the trace from the most recent boot will be mixed with the trace from the previous boot, and may make it confusing to read. + +Using a backup instance for keeping previous boot data +------------------------------------------------------ + +It is also possible to record trace data at system boot time by specifying +events with the persistent ring buffer, but in this case the data before the +reboot will be lost before it can be read. This problem can be solved by a +backup instance. From the kernel command line:: + + reserve_mem=12M:4096:trace trace_instance=boot_map@trace,sched,irq trace_instance=backup=boot_map + +On boot up, the previous data in the "boot_map" is copied to the "backup" +instance, and the "sched:*" and "irq:*" events for the current boot are traced +in the "boot_map". Thus the user can read the previous boot data from the "backup" +instance without stopping the trace. + +Note that this "backup" instance is readonly, and will be removed automatically +if you clear the trace data or read out all trace data from the "trace_pipe" +or the "trace_pipe_raw" files. -- 2.51.0