From patchwork Mon Feb 26 18:49:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 206855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2268211dyb; Mon, 26 Feb 2024 10:49:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUfutW9i1tiUN8DaiODWCsVa1lIh/FcbsXJfOlKnlz+kMBcG18chG/97mHLNvfbULWrr5k8C2JlvGeALV7Zo9q7WXgsAA== X-Google-Smtp-Source: AGHT+IHhsCs23F2OoO0932uaIP05Vbs5yubwRwHVJIKQoho9MxzDnM9EvOUcUCOMUz7Ex1t/L77h X-Received: by 2002:a05:6a21:2d06:b0:1a0:eea4:c612 with SMTP id tw6-20020a056a212d0600b001a0eea4c612mr8625pzb.11.1708973351101; Mon, 26 Feb 2024 10:49:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708973351; cv=pass; d=google.com; s=arc-20160816; b=paX3CqMCdhBquIVZFqw6Fs2JMpKKnArFVxDn5Uo5DTdzpTGZUrNiICCZXHnf8AlGHN 40mxsHA0I2jgXm+hz/M2Gd86B4no90BcNohUeVlpS6gjskVLhTLAVkUfFbaRzdDkLWZw WbY3e35yFrT2bqxxkjI5vSUsZxyxeWFWrRmytKrZaReaPN9LnW0BIrXQzsaIfCgCyw5z AmrBg8hmCYwI/i6v/3rmzzhIMAKVQWQ48+RQcHj+GQinryyvkWESn8aEmLDhgklfEWMF 20FIj/8VzfgF9zUKt2qofUxP33JiynMOMfQVkP6zUscT9O8HKDMZTbPeQS37FUmYHFWU SnAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=Fb+AhmMKYZJCaIkzLf91E/McdT8osvASEC3gea/QDik=; fh=mTYg3JJ8i2GBNLFt8qb4bgYwOyk0kmrOzICLbi6qJ1c=; b=xJ4KX3zzlZaDg+tH+UDFLKL5RTODZ+mRSiNvDoGPsUCow+4kq3ns0fGOEgGWW/7v/O wA9ze4qMXKvZTm5cS/Ef7Gt4WFw43k/VuLT5BFy6bW5C079RhncUJpb+nrt0mf8xjpqv BRob2V/nBXdRYd2EDXZ4s9XecLrl5t+VegTp+WHALg1UVzwyPKk5rHAGrO5W48xNxpEq myTwuafYdNRDH1NuqIDf6MtHVdto4YxACbNTIvbM4W5pDGm2xZDbtdkqcFpUF980TVbd 4l9lRotDDu1fSXt1m2/rjjgVBJ/92wse1gVwdxRqWKlzuh1DWClXnlAG7WxMOdvlp7i9 r0iQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-82159-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82159-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u6-20020a170903124600b001dc730e11bcsi23460plh.489.2024.02.26.10.49.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:49:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82159-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-82159-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82159-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E218E2901D7 for ; Mon, 26 Feb 2024 18:49:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 713DB130E4D; Mon, 26 Feb 2024 18:47:54 +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 8186C12F59F for ; Mon, 26 Feb 2024 18:47:51 +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=1708973271; cv=none; b=R9YegZS+nmaK7MIrzbEOL/jBOi//3bVvmZPkBZ+JlKtgnGXreNM7y2+OnQcDeKcd/8V+C5yGtDs08+LNB7eUbTqPAwDiGDemlbAFQEeZPX/OlD2/DEHzYeerZgFmCrjFj1CS9CKLYU/RSZhCYc8RLl/FSV2mQ51A/e9M7SEThYg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708973271; c=relaxed/simple; bh=6vxNuCJhE20SNjmJNgdjljhBB1xNE4nu9UBSoxje/d4=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=VMbTXXuuInguw7jXsgBFrT3VLs8kdQuuGj+LjWBA558YwtdGGqkKQzGw3UKjHfDpqSYIHduTyKSBQWzSM+UyVdU9nHSYj6Fy6j/Ak6eNH+JY8B1diy0076CW1JA7rs+TMgnw1QiBjURNYhakH40wjarQRv7Wd2LidnwQR+Prk7Q= 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 322C8C43609; Mon, 26 Feb 2024 18:47:51 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1reg2x-000000090bP-2VIq; Mon, 26 Feb 2024 13:49:51 -0500 Message-ID: <20240226184951.460548167@goodmis.org> User-Agent: quilt/0.67 Date: Mon, 26 Feb 2024 13:49:37 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-next][PATCH 5/5] tracing: Remove second parameter to __assign_rel_str() References: <20240226184932.303400070@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791988440893524473 X-GMAIL-MSGID: 1791988440893524473 From: "Steven Rostedt (Google)" The second parameter of __assign_rel_str() is no longer used. It can be removed. Note, the only real users of rel_string is user events. This code is just in the sample code for testing purposes. This makes __assign_rel_str() different than __assign_str() but that's fine. __assign_str() is used over 700 places and has a larger impact. That change will come later. Link: https://lore.kernel.org/linux-trace-kernel/20240223162519.2beb8112@gandalf.local.home Cc: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- include/trace/stages/stage6_event_callback.h | 2 +- samples/trace_events/trace-events-sample.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/stages/stage6_event_callback.h b/include/trace/stages/stage6_event_callback.h index 935608971899..a0c15f67eabe 100644 --- a/include/trace/stages/stage6_event_callback.h +++ b/include/trace/stages/stage6_event_callback.h @@ -91,7 +91,7 @@ #define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1) #undef __assign_rel_str -#define __assign_rel_str(dst, src) \ +#define __assign_rel_str(dst) \ do { \ char *__str__ = __get_rel_str(dst); \ int __len__ = __get_rel_dynamic_array_len(dst) - 1; \ diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index 2dfaf7fc7bfa..500981eca74d 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h @@ -574,7 +574,7 @@ TRACE_EVENT(foo_rel_loc, ), TP_fast_assign( - __assign_rel_str(foo, foo); + __assign_rel_str(foo); __entry->bar = bar; __assign_rel_bitmask(bitmask, mask, BITS_PER_BYTE * sizeof(unsigned long));