Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1486628rbb; Mon, 26 Feb 2024 10:42:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUW74V8NtI53aIz0yNpp7j+mveLNBbtGndLf/6RG83FLV55I0ltMk4XvwseT0q+80hgmcRjRLkr/VLKbC9mvkT+qV6rcrHcltC58qEckg== X-Google-Smtp-Source: AGHT+IHzMR6dyE1wIZ9frz1uBWWXKrdZG0bjInlY0/EWNgAbGVaTSqguo9wHdnUQNGruojcQvQnF X-Received: by 2002:a17:906:1cd4:b0:a3e:5993:96e9 with SMTP id i20-20020a1709061cd400b00a3e599396e9mr4692370ejh.42.1708972961415; Mon, 26 Feb 2024 10:42:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708972961; cv=pass; d=google.com; s=arc-20160816; b=NJw9VpbQ4kNaGVGVoWyQupOBxLs4CjhhWKir4hOlqu7jGh3a2IvUQ+WgXwmriwDzmf 9iE/+dyGDuOYxluWE6dygzP/b9ZdGCCBxsphxw8Sd+2fsWqAk0xIGaAZnmin8ef7hXFm 26IIzjnl/gnuthIwbNHg/fjlQdIFcsHBaQWOBwJfc+YQ9SNLqNNZtDxoJLeklvPzBUN3 Pl1Nj9LjKzd/3EXgySAsEhEVLhamMOi1sJiTiFp+jE5+/55vgOpXPLfJ3WFg1YMOnfAx xQx7IwqNgJu0FsQYJSzNSDErmMvxR0tUGSMcQE5yqKoRV9r/xX8urnTG5baijxiGgRi/ Zjxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=3LUtgpe7weGWtOI0xYpuTJ3E4iVFaRSGymr+fKx5m40=; fh=JskjAxfYjfCfe1/Ib7SF7c3sjqrNDR9Ca59oToLZ9VU=; b=Kx7DnL/QNCukv6xLfKDZrHtWaGKIT/ljKOB0bnyIjokgvn79yIkF6q/rTdKPsx/VoG 0gUamwp3J7KuSyiGZzHFinM6cHBEiESNjQFFlm9eYl4CbBjG46ELJzMuBOeew2i6UWA7 QM9D4D3BKO4UNE0zSxw7ATQsregx/mkumhATKdFfSR8Y8dLGg2apRdGOYdF+AyAlLbCY iTIpEE+EafP4Vxenhhv3SEpDkITYSJpkzVXzg39RaUvh7UVzPEl+wla7fpdzDGez4OGk 1Q/jRboDxP0AFQTfJZoRAYCs9h+iU/gxs5J9zDlvpsBLRcMUDG7jyK9NrDHpRZarwJed MgwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-82148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82148-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ju5-20020a170906e90500b00a3f89680fe8si14498ejb.38.2024.02.26.10.42.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:42:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-82148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82148-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 262131F250B8 for ; Mon, 26 Feb 2024 18:42:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81A2C12F39F; Mon, 26 Feb 2024 18:42:30 +0000 (UTC) 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 F11181DFF4; Mon, 26 Feb 2024 18:42:29 +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=1708972950; cv=none; b=OtXkHRqPiOW+7O11VyLpAcAiHP8XSHXSZNaV4CJKdDBXEq+mfAYltkTUjyNJby1eaeXznIXBUpiGmiINHtpZkR2YOqCx7WbsenSyNcrdwsd9o922fmp1klcHXqIqB3a+Jr0DTeG20pOeYOB84Mgwcg3eCqQPNMrdwj/fSPnr9hM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708972950; c=relaxed/simple; bh=Hjg6gAVYSPGPkuU/WK2hyxogEVFTpcy0yZUtOOorB+8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iX3XREWM6RP3bCNvoLFs4sHUF6yLgL5snKR7HogRU/F69smLfT+VSKfUch0P48aSI1nFO9io195r25WHYPU/bZXv/14iM5JyUx4ZGkD4Uf7GbjK7yQHxUPBgFYMlqtZ0iB5XHAaO8zQLQ2xvjh81nx8v8lOEeAVT7AiOK9sd2AI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 778D5C433C7; Mon, 26 Feb 2024 18:42:27 +0000 (UTC) Date: Mon, 26 Feb 2024 13:44:27 -0500 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: Huang Yiwei , , , , , , , , , , , , , , , , Ross Zwisler , Joel Fernandes Subject: Re: [PATCH v5] tracing: Support to dump instance traces by ftrace_dump_on_oops Message-ID: <20240226134427.3a033d4a@gandalf.local.home> In-Reply-To: <20240226085158.526e8044a85ceca8578a1656@kernel.org> References: <20240208131814.614691-1-quic_hyiwei@quicinc.com> <20240226085158.526e8044a85ceca8578a1656@kernel.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 26 Feb 2024 08:51:58 +0900 Masami Hiramatsu (Google) wrote: > On Thu, 8 Feb 2024 21:18:14 +0800 > Huang Yiwei wrote: > > > Currently ftrace only dumps the global trace buffer on an OOPs. For > > debugging a production usecase, instance trace will be helpful to > > check specific problems since global trace buffer may be used for > > other purposes. > > > > This patch extend the ftrace_dump_on_oops parameter to dump a specific > > or multiple trace instances: > > > > - ftrace_dump_on_oops=0: as before -- don't dump > > - ftrace_dump_on_oops[=1]: as before -- dump the global trace buffer > > on all CPUs > > - ftrace_dump_on_oops=2 or =orig_cpu: as before -- dump the global > > trace buffer on CPU that triggered the oops > > - ftrace_dump_on_oops=: new behavior -- dump the > > tracing instance matching > > - ftrace_dump_on_oops[=2/orig_cpu],[=2/orig_cpu], > > Would you mean "ftrace_dump_on_oops," ? ?? > As far as I can see, it doesn't work. Command line parser requires "=" > for parameter value. Not sure what you mean, but it does work with: ftrace_dump_on_oops=1,foo=2 As well as ftrace_dump_on_oops=foo If you want to dump with an instance, yes you need a '=' sign. > Also, is there any reason to limit the parameter > to 2 or orig_cpu? There's 3 options: 0 = off, 1 = all (default), 2 = orig_cpu I don't see it limited. You don't need the equal sign if you just want the top buffer. > > What about this syntax? > > ftrace_dump_on_oops=<0|1|2|orig_cpu>[,[=<1|2|orig_cpu>][,...] That should work now. But why add the requirement of an '=' as that isn't needed now? That is, the syntax is: ftrace_dump_on_oops[=[<0|1|2|orig_cpu>,][[=<1|2|orig_cpu>][,...]] > > or > > ftrace_dump_on_oops=instance_name[=<1|2|orig_cpu>][,...] This works. > > or > > ftrace_dump_on_oops This works. > > e.g. > "ftrace_dump_on_oops=0,foo=orig_cpu" is equal to "ftrace_dump_on_oops=foo=orig_cpu" > And that does. I think this patch does what you are asking for. -- Steve