Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5653618img; Wed, 27 Mar 2019 12:31:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKc3FAQD5/kWxw1Qrzusvzm8FqZH8ohy3rbv+KOdq3PYlvFsJk571xW71MOVs8DUJRXBCq X-Received: by 2002:a17:902:403:: with SMTP id 3mr38550621ple.48.1553715065136; Wed, 27 Mar 2019 12:31:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553715065; cv=none; d=google.com; s=arc-20160816; b=SN5R3yEMf4fzUV7sGwThujltHWlXm/B7dJunAVVWeITVPDO7f2MtBtZeagUn64j+vK M+CQoSJnh69NC3Tnxn+M3U6COBvRDvqhsI8DeYx1OEtH2i1YPw/83bw5fYv+EsoJj7Cm 24xlFw1fWFJxIgdfg6lZoTJhdSDE8HCXnRaBVgVA5MSV4RRkbXA4PWPI3QcpcuLf8ABb rS37x/R9kSOTQkF0/PQCYs8i7YeeJ2w5jMb33SFEd2HMXwn4arxCv9B0E/jI9EqntG0X AX3D5zjTM77jCTcFZ/rITgJAHfBqsBQkQ1mDZB+SDMdiJE57BTe9sRFdD0ae7RmssRL3 tt5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MjKjDX+wv0IKl7O5V0IasVS3ED8ph1dxb7K6BAqonl4=; b=m2Ttn5p9y0zwbkO3KQVnIK6z6e3rmNMv1oagvcT27GkFb1hiIH+9RIm6n3TZ1JsWPM a0ZKDQjEZzV3KzKSOnNBKbmMiypZcge11KY0jur9FL5JqBGP0ZmNUUmQ21LZdi4MSNFI AAbpOaGben3B2VIi3uOFQibEfH3gOU97Slwob/RajImqpRlpna5kvJ7tHdMXO1E3XTQF fwphs/OSZPO6dl3D8yOoXiuplw6b3iJs6jeivUfiZfAOqZ8wc5Eau4Rx5y9dtBhs5JzV QgZ6erjM3R6DikCqZzG7jNjGXIlK8JEaKn4s6BaqHqf9BMEdzsRGICvengSPrWbIjPhH 546A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WcjcU8E0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj1si19358642plb.15.2019.03.27.12.30.50; Wed, 27 Mar 2019 12:31:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WcjcU8E0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732597AbfC0SDf (ORCPT + 99 others); Wed, 27 Mar 2019 14:03:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:43850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732545AbfC0SDd (ORCPT ); Wed, 27 Mar 2019 14:03:33 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6070321734; Wed, 27 Mar 2019 18:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709812; bh=8Hux6TbSRnoEgQ9f+YXXsBoJwgZklORkaD1SDS0Dcbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WcjcU8E0P8OQwCCuWuw4ZpzQnthLOjVSBJt5DkyYtTMh6/Yq/EEnL6ISg2wUwV22L jrjNARKuTWYsLj+cDDl1btQ7ifTMG7/ONHOOZeobHRiTZj7lAQ/Crh2oZ04pBU23Bj dJWVXz/lpYdAKJB0FTOmZUHqZm11RLyOsLP/+cxc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnaldo Carvalho de Melo , Adrian Hunter , Jiri Olsa , =?UTF-8?q?Luis=20Cl=C3=A1udio=20Gon=C3=A7alves?= , Namhyung Kim , Wang Nan , Sasha Levin Subject: [PATCH AUTOSEL 5.0 052/262] perf beauty msg_flags: Add missing %s lost when adding prefix suppression logic Date: Wed, 27 Mar 2019 13:58:27 -0400 Message-Id: <20190327180158.10245-52-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo [ Upstream commit c3b81a500f35241a4c16febe0a015e572cf2c492 ] When the prefix suppresion/enabling logic was added, I forgot to add an extra %, which ended up chopping off the strings: Before: # perf trace -e *mmsg --map-dump syscalls [299] = 1, [307] = 1, DNS Res~ver #3/14587 sendmmsg(106, 0x7f252b0fcaf0, 2, MSG_) = 2 chronyd/1053 recvmmsg(4, 0x558542ca5740, 4, MSG_, NULL) = 1 DNS Res~ver #2/14445 sendmmsg(106, 0x7f252ab09af0, 2, MSG_) = 2 DNS Res~ver #2/14444 sendmmsg(146, 0x7f2521a7aaf0, 2, MSG_) = 2 DNS Res~ver #2/14445 sendmmsg(106, 0x7f252ab09af0, 2, MSG_) = 2 DNS Res~ver #3/14587 sendmmsg(148, 0x7f252b0fcaf0, 2, MSG_) = 2 DNS Res~ver #2/14444 sendmmsg(146, 0x7f2521a7aaf0, 2, MSG_) = 2 ^C# After: # perf trace -e *mmsg --map-dump syscalls [299] = 1, [307] = 1, NetworkManager/17467 sendmmsg(22, 0x7f28927f9bb0, 2, MSG_NOSIGNAL) = 2 pool/17478 sendmmsg(10, 0x7f2769f95e90, 2, MSG_NOSIGNAL) = 2 DNS Res~ver #3/14587 sendmmsg(121, 0x7f252b0fcaf0, 2, MSG_NOSIGNAL) = 2 chronyd/1053 recvmmsg(4, 0x558542ca5740, 4, MSG_DONTWAIT, NULL) = 1 Socket Thread/17433 sendmmsg(121, 0x7f252668baf0, 2, MSG_NOSIGNAL) = 2 ^C# Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Fixes: c65c83ffe904 ("perf trace: Allow asking for not suppressing common string prefixes") Link: https://lkml.kernel.org/n/tip-t2eu1rqx710k6jr4814mlzg7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/trace/beauty/msg_flags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/trace/beauty/msg_flags.c b/tools/perf/trace/beauty/msg_flags.c index d66c66315987..ea68db08b8e7 100644 --- a/tools/perf/trace/beauty/msg_flags.c +++ b/tools/perf/trace/beauty/msg_flags.c @@ -29,7 +29,7 @@ static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size, return scnprintf(bf, size, "NONE"); #define P_MSG_FLAG(n) \ if (flags & MSG_##n) { \ - printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \ + printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \ flags &= ~MSG_##n; \ } -- 2.19.1