From patchwork Wed Jan 31 13:49:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 194754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1898238dyb; Wed, 31 Jan 2024 05:50:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9XGpBVsnmELvcTuxyQ3nBwwgY1t5VJrPsKkWmnw0y8LLnM52jQs6vQIprNVyoC7MQmdk7 X-Received: by 2002:aa7:d295:0:b0:55f:80e1:29 with SMTP id w21-20020aa7d295000000b0055f80e10029mr1115282edq.1.1706709008831; Wed, 31 Jan 2024 05:50:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706709008; cv=pass; d=google.com; s=arc-20160816; b=KpA9SsF/iq97TbWP51M1J0U15j6UaPLKLIMdRr19sbM5yluO4dzwnvW8PJoQtF/3Hx web1/zKvUSYJ2zAYqji4ESyKTZ/MT3Hhvjo5RobFanfW3ZN0x2oFm8dQuFIm3xlDZ8ZP FFfy7txVw7huWWk+JTwLlBr1ccGDBhA+FeNlUoa0MBV6aZ4vf80YWBv9gkcY8lG3+7Cl ttPS5for9ThAPFbJRuI34IU0z6SlEnluyZPr+VzNrin1uKQPRKFKl8VNrfqtvuc+1qfD UiNjSE33llLWxTj6+pBe8W5JzUUx/2mkGSsCdO6+RD3J2RkodBehwI/V6dacgfGo8qjA SG4A== 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=TRAmZ7zfR7GIpS+aIsz6syaxM6Q4TrPavG5oF05xWJs=; fh=c+IRRQDUWP6han27nSEn6xL2ob/dn47A0oh2WXsr30I=; b=FzEdAi6/Lb+AuvfW+H2JZvWtPKiLrmgul2SZ049m4sT7/quwKk8AlacegiSUsXxfAW ivXQFtlQIOkdnU/1/IhXNRhmavbWCQ3u82eNcRrXFCieliWhjKDvk6E/f3KT+tAcLwV9 JY/+dxYP4W/fB6APUIlrXMBZO/O+1x0USESQbIzfVxtCY3VjKoKM84JTkvwoSCZmJR7n ueFME41vm9HEByhL72MjWQtokwaaYB031acyUPM9LUErCkGQi7kBEHv7d17PCXXBMlsI RdWag/wgW/hylfeIu+Af4IUI6FCcT0Ez9/3uCF14cFGb+AGqaTXFzglSnqeTde/RojRy GDYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=XPdCq7EN; 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-46532-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46532-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCX3WcOxLAzLP3Q1Rdr919t93TBeiOayA9UV4cxnv0lwEycYDxLJPApeXAohlqlMyNllfiqFlqqHVotcElqMiyyrlRHPzw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x23-20020aa7cd97000000b00559523876a4si5566926edv.338.2024.01.31.05.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 05:50:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46532-ouuuleilei=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; dkim=pass header.i=@google.com header.s=20230601 header.b=XPdCq7EN; 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-46532-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46532-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6EAFC1F21DD0 for ; Wed, 31 Jan 2024 13:50:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A01380C13; Wed, 31 Jan 2024 13:49:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XPdCq7EN" 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 7B2DD80BF1 for ; Wed, 31 Jan 2024 13:49:49 +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=1706708990; cv=none; b=fVSzxVSAPr5xPSuAywgT9e521wYXmjM74WZePgBFxDpI52c7DnQGog1Ggrew0XEwzczYPklsGsdFfrfwEPK2hVyRkIVbyHEMN/NlgJTEa6P8N99+/icIaORlm1NvC+6CFPeVNW1tDT9vfALbJv++IWpgbI1E3a063SLAdRNF/UI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706708990; c=relaxed/simple; bh=u2dme1MUFaWQF1BSStVrUjjYLnHIqMsZ+Wjfwetyd+o=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=ESjZZp5/+tUACIiAQEUjiqdDEUb5US82Z5l9U9k+BnBopxpmopXwN8BGsa33mEDPFPYo9gyr+zDWl8cmpAoZjumvYSVlfGWKhd3bXO9YiwJKmrXkjYO3jwONQbOt8F/oMYkna36QC+OUeCuhWaX5o/JrjkcTMfMk5Jluou2IIDw= 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=XPdCq7EN; 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-dc6c47cf679so801533276.0 for ; Wed, 31 Jan 2024 05:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706708988; x=1707313788; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=TRAmZ7zfR7GIpS+aIsz6syaxM6Q4TrPavG5oF05xWJs=; b=XPdCq7ENDKCH03IYWpJWWzcDbG4raKx2XumxlXaJJevXX00oTKTWX3gHAWyUBXtzIU 1Oy2YV4FOV+GXeGSYj4Kbng5P2avdJbN2eytRr4Ed1NK1DLu8DbJIngkCqDrl8KijmUz 9PMilDUg/C0CvHP0K/dHPFk6+UxS88zyGm1CiYCpuPFOKYzeLvBxYUJQ1kJoFaLAg/Z1 BpXMDur1nrdknuhK7eg7kc4OHg+CevQSNPA3glys5LDOMbnLXKAPg7kKV0NV7q/yazsP bhiAbj0mQO5Yp2QGCmPbHXzkX6/x4H0JU8FrPAXTwYnEfQyPbegJC//qxB6S4rgaiOMV Mffw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706708988; x=1707313788; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TRAmZ7zfR7GIpS+aIsz6syaxM6Q4TrPavG5oF05xWJs=; b=m8wew3YKwhIS04doYFOtwdokot1HD1qbkq3QmBJSPcRKyoIzAlhQW9NjW9aaRsJKIO FkgRf26Ngyhpvpbz53P+6yanHNpdSWZGHjq9evVb8bY/e8zfdL2UQpsd2xfBIoMeY+S1 3OFZvesSXVaiHNKalCzgLwHrrZe97X+8NVZ6noeA3BYPYL93DRRI1uPffkavG3+JTrDU 5M8MEZpkIV//Eg4YTkI7Rw7ST190UeT5rsZ33+kegI7AYkiTsM2xabnTbs3subGO3Skx rpTrb3De0TE/HGwix4IwSPqebHyK2Y6Q9YpHzJQ2gGN4cxPdk//FjMOdYzKSfePD0Zi9 sOCw== X-Gm-Message-State: AOJu0YzO8X9011nmM3JnscCDm4H4hKj0KvUWxs/Gc5IdJIlWXqznZpA5 MHc8aZFlcT7GhaqZpj1MOfuY4Z7rzdhUoXiYCQ2GXvJ5g088B+DiDiRLggqcCL9dMeyR4/sePLc TALlQyg== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:d0ab:43c6:7969:62ab]) (user=irogers job=sendgmr) by 2002:a05:6902:1793:b0:dc6:519b:5425 with SMTP id ca19-20020a056902179300b00dc6519b5425mr468454ybb.11.1706708988337; Wed, 31 Jan 2024 05:49:48 -0800 (PST) Date: Wed, 31 Jan 2024 05:49:38 -0800 Message-Id: <20240131134940.593788-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.43.0.429.g432eaa2c6b-goog Subject: [PATCH v2 1/3] perf tsc: Add missing newlines to debug statements From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, tchen168@asu.edu, Michael Petlan X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789614105658470337 X-GMAIL-MSGID: 1789614105658470337 It is assumed that debug statements always print a newline, fix two missing ones. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- This patch was inspired by bad debug output in: https://lore.kernel.org/linux-perf-users/CAGjhMsg_bVKJ_zfsLUR32+oZwGDr3OiBHV_BJ3QtFjyKAs7Sgg@mail.gmail.com/ --- tools/perf/arch/x86/util/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/arch/x86/util/tsc.c b/tools/perf/arch/x86/util/tsc.c index 9b99f48b923c..e2d6cfe21057 100644 --- a/tools/perf/arch/x86/util/tsc.c +++ b/tools/perf/arch/x86/util/tsc.c @@ -33,7 +33,7 @@ static double cpuinfo_tsc_freq(void) cpuinfo = fopen("/proc/cpuinfo", "r"); if (!cpuinfo) { - pr_err("Failed to read /proc/cpuinfo for TSC frequency"); + pr_err("Failed to read /proc/cpuinfo for TSC frequency\n"); return NAN; } while (getline(&line, &len, cpuinfo) > 0) { @@ -48,7 +48,7 @@ static double cpuinfo_tsc_freq(void) } out: if (fpclassify(result) == FP_ZERO) - pr_err("Failed to find TSC frequency in /proc/cpuinfo"); + pr_err("Failed to find TSC frequency in /proc/cpuinfo\n"); free(line); fclose(cpuinfo);