From nobody Tue Dec 2 01:36:14 2025 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA2062D8DAF for ; Sat, 22 Nov 2025 08:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763799581; cv=none; b=kSpfRPlv4moFV3dALVqzrzTk0ARm+YcpucBL9bGpwAwKrDjR92JdSqnRVpASbNM6Gr48qxq6dTMiVoeXgpm98kmzjSd0k3KfjSRqHWWTXZE6999OSnxmg/8m/9MkyMuVOQfmAVwpGb2b/TJXGyJ6lK/nddffV4MMbHZgHBtrxMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763799581; c=relaxed/simple; bh=lcitgjEQcXl1ueB+btDph/z9Qk2ubVjcj5n/+Z1wp9U=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=nN0lIAMjT2kaZnLNlpHACvfmO4TQ++SaiK8YrSTQri78VXJxP/f1d1tf25jooCID0uqDp/MhD4IUh6xNh1N2d5lr0rLXONK4WEr17IZVUE37YgnZDAC1De8GTvultjww/E+1/xwa3Fc+vG8G/eomYROezz7VmMvI5ygiXNqV+KU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LHOIFRai; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LHOIFRai" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-297dfae179bso81304005ad.1 for ; Sat, 22 Nov 2025 00:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763799579; x=1764404379; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=olDcTWaXoeAAZhaDM2EEwFLEFX4r4XtX7pbuTmW4sUE=; b=LHOIFRaiztihTktBVsUZdTuoAT/BrzAewNIh1SG0Tby58D3i7461k1VqIpobLGabGl 6Tai++nW7nXnChlS6IohMjAwPfXARA6DRY3xhVNOEfeBZramj901CSeZahKsL4EFdZZG uZ9cWOuPcOAtCrht+uuEt4+gQ+jqcpoXPY4vdrPR/XAEaKINgpxqJqYogUKRFd5/bdGa 0ohsCNImSASLqi/Gupsd2IP1uQzwajxgVHHCx8uBAiE/guyf+S9zAAXVyxJh7IYxsiBi MTsOEo/B8+tRYhOVtZPQAeMSoKvNaF+mj0UHDA62Fa/Uvf7Fq/gotoaunkMb7ZQO+fdc OR1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763799579; x=1764404379; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=olDcTWaXoeAAZhaDM2EEwFLEFX4r4XtX7pbuTmW4sUE=; b=Gnek6ithGTJYIs1SKtHufFswKvq9cq1iygzuEMbgzFvpg2mxHAH955EeHGloZVyiyL bO0KnH3XBDIyiYbwe8EkRDbjxwlUzQQvzK25IsIFNqActevBjlr+bEMvD7XF/8GI6QRA KWFz3FstdtLn2u+o/Fn963vILt7lf4CKcrkw1zsE1r8gnf/81yob79dG/vL1sNayIaNH U/5zWEDK4wNzLS2ZPGZwDRJY2RF3Jcvj53I9gMjeYNVJ8WZgJkHgcABgMUbr3MFpH2Ne DAAfR3cz74S8uWiDptekOxF+dwXxj/ecg+6SGGVUtVV++m9Ckp9fU8+pnLenltcGVsy6 mwwg== X-Forwarded-Encrypted: i=1; AJvYcCXFsv1qOqDJsqJe0gee0/Vgmbb5D95n+IIHeTHCuN1i00WErfJzjea5/qNJu+jqdlN9i12devS0LCLnkng=@vger.kernel.org X-Gm-Message-State: AOJu0YxKKqMM4iCzNagAfa+PPC/+5h14g90deVS8cXDV14FVM35v2g4I dF58piDLaMldMZXNL4pKW8R5ytIFdQWtkG2ef9MqWxNMx35u1j44w1S8zyA1jjFkAd+bJ0M7YBa L1eUIIF6pRQ== X-Google-Smtp-Source: AGHT+IFg6Ktrj2zIwJbXlbe5LDlc+MS/s38n577fvz01e7jf8fE8U5cwWbIJlEx4XNUPC4DWxaE7w06J0Wjy X-Received: from dlbqy19.prod.google.com ([2002:a05:7022:ef13:b0:11b:c1ab:bdb1]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:ec88:b0:11a:4b72:35e8 with SMTP id a92af1059eb24-11c9d7092b7mr2588098c88.6.1763799579085; Sat, 22 Nov 2025 00:19:39 -0800 (PST) Date: Sat, 22 Nov 2025 00:19:14 -0800 In-Reply-To: <20251122081929.7588-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251122081929.7588-1-irogers@google.com> X-Mailer: git-send-email 2.52.0.rc2.455.g230fcf2819-goog Message-ID: <20251122081929.7588-3-irogers@google.com> Subject: [PATCH v1 02/17] perf timechart: Add record support for output perf.data path From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , Collin Funk , Dmitry Vyukov , Andi Kleen , Thomas Falcon , Leo Yan , Yicong Yang , Greg Kroah-Hartman , "Masami Hiramatsu (Google)" , Stephen Brennan , Haibo Xu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The '-o' option exists for the SVG creation but not for `perf timechart record`. Add to better allow testing. Signed-off-by: Ian Rogers --- tools/perf/builtin-timechart.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 22050c640dfa..f8b49d69e9a5 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -1651,7 +1651,7 @@ static int __cmd_timechart(struct timechart *tchart, = const char *output_name) return ret; } =20 -static int timechart__io_record(int argc, const char **argv) +static int timechart__io_record(int argc, const char **argv, const char *o= utput_data) { unsigned int rec_argc, i; const char **rec_argv; @@ -1659,7 +1659,7 @@ static int timechart__io_record(int argc, const char = **argv) char *filter =3D NULL; =20 const char * const common_args[] =3D { - "record", "-a", "-R", "-c", "1", + "record", "-a", "-R", "-c", "1", "-o", output_data, }; unsigned int common_args_nr =3D ARRAY_SIZE(common_args); =20 @@ -1786,7 +1786,8 @@ static int timechart__io_record(int argc, const char = **argv) } =20 =20 -static int timechart__record(struct timechart *tchart, int argc, const cha= r **argv) +static int timechart__record(struct timechart *tchart, int argc, const cha= r **argv, + const char *output_data) { unsigned int rec_argc, i, j; const char **rec_argv; @@ -1794,7 +1795,7 @@ static int timechart__record(struct timechart *tchart= , int argc, const char **ar unsigned int record_elems; =20 const char * const common_args[] =3D { - "record", "-a", "-R", "-c", "1", + "record", "-a", "-R", "-c", "1", "-o", output_data, }; unsigned int common_args_nr =3D ARRAY_SIZE(common_args); =20 @@ -1934,6 +1935,7 @@ int cmd_timechart(int argc, const char **argv) .merge_dist =3D 1000, }; const char *output_name =3D "output.svg"; + const char *output_record_data =3D "perf.data"; const struct option timechart_common_options[] =3D { OPT_BOOLEAN('P', "power-only", &tchart.power_only, "output power data onl= y"), OPT_BOOLEAN('T', "tasks-only", &tchart.tasks_only, "output processes data= only"), @@ -1976,6 +1978,7 @@ int cmd_timechart(int argc, const char **argv) OPT_BOOLEAN('I', "io-only", &tchart.io_only, "record only IO data"), OPT_BOOLEAN('g', "callchain", &tchart.with_backtrace, "record callchain"), + OPT_STRING('o', "output", &output_record_data, "file", "output data file = name"), OPT_PARENT(timechart_common_options), }; const char * const timechart_record_usage[] =3D { @@ -2024,9 +2027,9 @@ int cmd_timechart(int argc, const char **argv) } =20 if (tchart.io_only) - ret =3D timechart__io_record(argc, argv); + ret =3D timechart__io_record(argc, argv, output_record_data); else - ret =3D timechart__record(&tchart, argc, argv); + ret =3D timechart__record(&tchart, argc, argv, output_record_data); goto out; } else if (argc) usage_with_options(timechart_usage, timechart_options); --=20 2.52.0.rc2.455.g230fcf2819-goog