Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp56299lqg; Wed, 10 Apr 2024 15:24:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOmmh+QGiFAb9pzMlpMKmWMvUCoIfs+J2iG3wS8VD1lXK0usmuzW2tDdmCQInSYAhN5/ED5cMUMuTl6n9PTyunuyz5vF+aKl+sAZJnXw== X-Google-Smtp-Source: AGHT+IHIAgrHlaDW01UrED2w2DfpEwCS2S0SpsDSzSB9j3gkVSmiceBPRF4CI04eWEueREQ7KWue X-Received: by 2002:a05:6122:21a3:b0:4cd:b718:4b08 with SMTP id j35-20020a05612221a300b004cdb7184b08mr4324810vkd.11.1712787849882; Wed, 10 Apr 2024 15:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712787849; cv=pass; d=google.com; s=arc-20160816; b=eI7Jazd9i1eVeq1x7P2ZM7Xh98i7/ZK+6ALwUjEtCLL64hiU5/LnYS9zOtptuTZHpt 7/u940+9R3Y2Dm123k9635pqB85T/Kn3ZWOHamw5LoQJ2KgfXMSGaHKq+umLh1Etds4M PprYL2fw3whsJPqbCdB1TWDAhKW2ZmU1HiCCruOrr4TgeiMn5LAqpINa4Xpnx42u0CBn E7RFaZxb54AXVG3Uvi+DPsclA4Ns3mJmShUKCcOWmYCp2Z+8vscQ4E6QE7Uc53wG21Nd rkcZjMvu1ZzxioVVa3fRwfEGW9g88uxIenRZpEZBeyBj7trBbHbx87J1x1S+z3eTAs+C gj1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=B+F+2wBjMyMgvGwjkNxLfH9Fpi5N9urgZl/EZiGxcNI=; fh=Ky4h0DD7NDgVp9pLBryGttGPL8uRGj4yy1f1vifzeyg=; b=a4aedxArPJ7XJdBlcbkIA+6n93vVUbatWO2VCEdfwyrl8cxWr5gzillWB5Y8f3tw+M VCumhuQH9HfKncoXoIpl+Sr1WR72eK0ARKLnCF86WKDeETL+UG8AyjQVFK7/qlhHhx6t 9FhnC5wLui7a5mxbHEiFbNlKnOzO2LCQo1mi304omes+VRCTBYL6aIZNt0HSdYQ9wljq JpJa+V5vJv9DjnojXnXmHkMKMPeCGUOrw6gI1yjitoMTC7W4GoLyOQs0CHCsvc68CFnx ds4HtXyORxdfwL5LqCxDT5g8DOm73Ot5Y+cxBbbf+q3+6a5wdo93inXdIj8XQ6yjmxry GRDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=BfaHxowS; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-139431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x16-20020ad44590000000b006992b6a1403si167244qvu.401.2024.04.10.15.24.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 15:24:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=BfaHxowS; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-139431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7DF8C1C227FB for ; Wed, 10 Apr 2024 22:24:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0EEC184133; Wed, 10 Apr 2024 22:24:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BfaHxowS" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.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 7890F12FF7C for ; Wed, 10 Apr 2024 22:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787839; cv=none; b=ChEdd+T4ru5gk7dKNtNM7v3v9GjNGEihM0ToJoPcic4DkQsTI9xB50vfxpY4p0BWV9bxR7TlmQYSziWhkEFI1BwarpbTMqc/gMEiilNyrKj9/3O63b/FpOCaX0NudOgjdnXqWQ9lMMnPBUKEZnCPvsNmolBvIgkjZNMVvVMtXaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787839; c=relaxed/simple; bh=GAU+2rZNqMkHZN8SbllEOZVUOsdEVBIYY2092Hb26Gw=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=A4t0tfegm74xg2IHlzv6CEqXJP5Zo2Cz3Y9NbNF5Pm/0XJBulvVe0OxxSgEboM1nyzgbmpsyRa/wV586XvrID9Z3mXcVl5Ay7YYCXJakOS4pJ4VBhdVpLIrFkR2uXlCDlee3GicNqiKwXEWw0sRx0YNe2fqhdDkNHgI5bCvcACc= 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=BfaHxowS; arc=none smtp.client-ip=209.85.219.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 Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc693399655so12815229276.1 for ; Wed, 10 Apr 2024 15:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712787837; x=1713392637; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=B+F+2wBjMyMgvGwjkNxLfH9Fpi5N9urgZl/EZiGxcNI=; b=BfaHxowS1E5//epfMSK7QJAm+KTlwWeB6m13K0yCyWVWjci28Hhj94PO6mpAh80WJP OafXkaVuGZ6AjoJiM5hRyscG2AmmsH3wf60Etvv3PquCF09/q8J+1J1QC0bmG1i7H70p +UaWZYnm7/RYgJEpsPdMc94javziLvhRJRIxaZn+oyfpJcd6vTLHODMHsEXCtl9U1YPD 5VQOJoB9UjUSgq7F8DE1YO1ADdgspGl4CpfvzhKP0uPsygxG4fvkxAaG7Hqg36qw2Dj7 eiT1yCnuAdA5UtNuaZ+CyW5Bo9hoTAw4+Jfo0Lb9aauMAS+DoJjYzP/158VZ01SWNGb4 NdXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712787837; x=1713392637; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=B+F+2wBjMyMgvGwjkNxLfH9Fpi5N9urgZl/EZiGxcNI=; b=J05lOYJtRg8Jb+sTImmf7K9JfsbQ9EAjZgix29TFzjVghbD3eF7a1olrRuJUqcAKlY a75JaxWhIFtMg4vO8J3W/P+kuoEF5MAzvkh8q/0wRi369jSsfG3dyniIHWcPuYocZBUu uDzJ/MjPyqcBBkfFhgmAXIK+s7+THBE//wsZ14ggUmiPteDhztfxEo0RdFgUuriIGl56 OJthj8Mpn6rCPh46n3bqPonoPpX/T14HTR6Q025M/IMb1G0eNl4HTYBWnMIbQWMeaif6 C3EIOsSTzy/FWdpxPj0HhStOygBDJR9f6DylmJwK+2Pso0xaLZJHDlNed4KXmH5WDePM tXLQ== X-Forwarded-Encrypted: i=1; AJvYcCUqw6wfx2jdS8XKbs9Hk2QdtBWV/OLp7UFkPjj2PKz0R+2cDtRpl2I8Izm7HyDxWvbwT+Af1jgX8VLvJmIytocfvDWcyC/kQm6ilwrx X-Gm-Message-State: AOJu0YxUljOouA3O1gR/rlRaOnTjvPP7qAMJULMuniKk1GH7mCS0my6k /flZk32ynQV8X4XB1Iel3dEOeUOHQa3UORPvM9qzgd8H5k/2NT+I6Ys55Piua4PnRppo6xAsZRh MRGlhww== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:ed7d:1d85:433a:d24c]) (user=irogers job=sendgmr) by 2002:a05:6902:1506:b0:dc7:7ce9:fb4d with SMTP id q6-20020a056902150600b00dc77ce9fb4dmr1086916ybu.12.1712787837515; Wed, 10 Apr 2024 15:23:57 -0700 (PDT) Date: Wed, 10 Apr 2024 15:23:53 -0700 Message-Id: <20240410222353.1722840-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Subject: [PATCH v1] perf list: Esacpe \r in json output From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Events like for sapphirerapids have \r in the uncore descriptions. The non-escaped versions of this fail json validation the the perf list test. Signed-off-by: Ian Rogers --- tools/perf/builtin-list.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 02bf608d585e..9333cc64c2ce 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c @@ -313,6 +313,9 @@ static void fix_escape_fprintf(FILE *fp, struct strbuf *buf, const char *fmt, .. case '\n': strbuf_addstr(buf, "\\n"); break; + case '\r': + strbuf_addstr(buf, "\\r"); + break; case '\\': fallthrough; case '\"': -- 2.44.0.478.gd926399ef9-goog