Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2496086rdf; Mon, 6 Nov 2023 16:45:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOVawtIL8Cev5MEAr/G5WTVwZLPqmQIKPRk5RL2PddLo4oUohlctH/US4vPNHQyJ0T6FcU X-Received: by 2002:a05:6358:5924:b0:168:de6b:6c70 with SMTP id g36-20020a056358592400b00168de6b6c70mr29780215rwf.1.1699317943987; Mon, 06 Nov 2023 16:45:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699317943; cv=none; d=google.com; s=arc-20160816; b=n9PCfTmeXSVcrJflyhp6yhoR3+aDMjpy2rRK3DIGihicrmbjb0yO6x2LTX9lOMrxUl R8QdH1Et5tms+kx+at+BrsRQn9t7OpyADglr9auQGMQU07WfzJnXJFr7tTOxsQcTzXpf FDk2c5QXAGU5tngS7NMIpHIv0L8iaWEWer80Dxi0UYydrF5G7fPs745d6LJ7d5kLF76o HvDQgfSID5cnC+6db8Og8HrnN3oXQozC1zXgZdc3O3ccuB9c8nHGbfd6LBUHIh2GpdW8 qf63Xk7TGvtTkFuW4b2wGGZYEqp5fGFJOkkdsa9EJKs5ZrHus8bTTS56dEfuwXmZ0IGH Fmdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=XEJObYmoFkd33WPoqDOGzM2bUBml4J5rHZPZw8lqGrY=; fh=KxKPX7akoqM5P0Fnfjcd/Qn1roqWg9d05oyLGcyeNBY=; b=JZl0BAHPZ/fsEr8pBJYEaxKqUPikWXZMJGaGazR5TSURUy7gV0arxP9yCAWY+leBcF 3OiiQJn7SlhJpJpqi2Foj9q4b8Hw5yATDqtkbDPXs0y5X3fMHLq45AMujiRgz/5pxdAl tMCLCB4iDybJk2clU024mY9Ae8eZAI2jhR08SBsoUObZdfsJFznOwipNxSAQtT24i+hR ngNeTgPRlUil9ii4iuvalD/Bmo++tr2CWV41z6uwqxScLDccl3VrfQyPcLJWWnmjJJt8 WkRFXyb2Tn5DpKyfwgnS4lHMXn5GZsdV7GRLUszc7I+/6rRnPLgyf0w9qEWwfy5ZBBL3 0RFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id ck6-20020a056a02090600b005824bad8f81si997498pgb.853.2023.11.06.16.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 16:45:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E73F1807C575; Mon, 6 Nov 2023 16:45:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233069AbjKGApD convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Nov 2023 19:45:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjKGApC (ORCPT ); Mon, 6 Nov 2023 19:45:02 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA12E9C for ; Mon, 6 Nov 2023 16:44:59 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDC22C433C7; Tue, 7 Nov 2023 00:44:57 +0000 (UTC) Date: Mon, 6 Nov 2023 19:45:00 -0500 From: Steven Rostedt To: =?UTF-8?B?xYF1a2Fzeg==?= Bartosik Cc: Jason Baron , Jim Cromie , Andrew Morton , Kees Cook , Douglas Anderson , Guenter Roeck , Yaniv Tzoreff , Benson Leung , Vincent Whitchurch , Pekka Paalanen , Sean Paul , Daniel Vetter , linux-kernel@vger.kernel.org, upstream@semihalf.com Subject: Re: [PATCH v1 06/12] trace: use TP_printk_no_nl in dyndbg:prdbg,devdbg Message-ID: <20231106194500.123a517e@gandalf.local.home> In-Reply-To: <20231103131011.1316396-7-lb@semihalf.com> References: <20231103131011.1316396-1-lb@semihalf.com> <20231103131011.1316396-7-lb@semihalf.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 16:45:13 -0800 (PST) On Fri, 3 Nov 2023 14:10:05 +0100 Ɓukasz Bartosik wrote: > index ccc5bcb070f9..91dcdbe059c0 100644 > --- a/include/trace/events/dyndbg.h > +++ b/include/trace/events/dyndbg.h > @@ -20,20 +20,10 @@ TRACE_EVENT(prdbg, > > TP_fast_assign( > __entry->desc = desc; > - /* > - * Each trace entry is printed in a new line. > - * If the msg finishes with '\n', cut it off > - * to avoid blank lines in the trace. > - */ > - if (len > 0 && (text[len - 1] == '\n')) > - len -= 1; > - > memcpy(__get_str(msg), text, len); > - __get_str(msg)[len] = 0; > ), > > - TP_printk("%s.%s %s", __entry->desc->modname, > - __entry->desc->function, __get_str(msg)) > + TP_printk_no_nl("%s", __get_str(msg)) > ); > Instead of adding the TP_printk_no_nl() (Which I still do not like), we could add a: __get_str_strip_nl(msg) That will do the above loop. Which will move the processing to read side (slow path). And then we could update libtraceevent to handle that too. -- Steve