Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp371091rdb; Sat, 19 Aug 2023 05:19:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUC2nlG7nrZFxVa2YiyCvoeMWiZGY9agmOhfXsrLuveiHqRVi9XOP/UvPnQ/s21cGLJ98u X-Received: by 2002:a05:6a20:7da6:b0:12e:f6e6:882b with SMTP id v38-20020a056a207da600b0012ef6e6882bmr2872250pzj.1.1692447591196; Sat, 19 Aug 2023 05:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692447591; cv=none; d=google.com; s=arc-20160816; b=Jv0cv/kUbwFMxUkzMU/H6GOBhQgCy1TdestkSJ9iRYLnAkuzHEbVR+9PRJmFK6v86U 9vwTM6dtvxkJnRgWnbaybzqErYCXyfe4mjq4M1gzVBIyDMSRW/g0KBMSBARzMC85TTjJ Q7IVzasSPjwKuGw2nSq5Gp6O+eNN64bDPltvry18OeaF3HzhW3vIgzONO5iuZfGGFHgh H9+IXu0rzFpv+lG4fG24PIcAm7rxkkbaV5gz8TvaAAUHYBzT5pFIh5XO2WxDY3Y+jlRH xyXHEftXdkNMBRaoE/fETKYW0M/S9hMIsL46AeCbW04wo8PRnlSFDa9R2SrKippNiO5f jpoQ== 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=QDsbd2BYPWq9g5Efp2nIRqOG26YdC8LRfMLv8ypSFaU=; fh=xFJo/CfJJd0t0IYJCUB3bOQteYBCLcFgVPmY5QJ8n9A=; b=mlAhd9J5oUCeU53P0zh/pvU5k0dItrmYK5/yqOQyRgW+PLkPGNvWPJEU2NIWUb8l7R FLL1YiPUJclHK52kAxynfMSEbaTzjWMiIrxvGecijnPCpiL+VzF10+o+l95G5mjAYOOh rC8SaYx0OKWh+RyVmOm0J8mMlkOAcvFohWMMmdbkYEQyt8Sg09NyhwiTFeIPmOMFwfMJ sfzH6B/GBjFBFkcFBYllo57mrLQ1Ib8p6HkA4kagjgSyshP2Lo4WM9gmySSHsgrK3WRm 3YQdKF2ky6Ymrr0l3SO/9hXg5EAWALly0muCxUrbVNId9X4piOSd/nK9fMnXwPMzvwO1 WI6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id cg11-20020a056a00290b00b006884347114fsi3293121pfb.98.2023.08.19.05.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 05:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 601F27F7DA; Sat, 19 Aug 2023 01:36:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343931AbjHPPCY (ORCPT + 99 others); Wed, 16 Aug 2023 11:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343940AbjHPPCI (ORCPT ); Wed, 16 Aug 2023 11:02:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 422DB10FF; Wed, 16 Aug 2023 08:02:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CB2946247A; Wed, 16 Aug 2023 15:02:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB8FCC433C7; Wed, 16 Aug 2023 15:02:03 +0000 (UTC) Date: Wed, 16 Aug 2023 11:02:06 -0400 From: Steven Rostedt To: Manjusaka Cc: Joe Perches , edumazet@google.com, bpf@vger.kernel.org, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org, ncardwell@google.com, netdev@vger.kernel.org, pabeni@redhat.com Subject: Re: [PATCH v3] tracepoint: add new `tcp:tcp_ca_event` trace event Message-ID: <20230816110206.13980573@gandalf.local.home> In-Reply-To: <8b0f2d2b-c5a0-4654-9cc0-78873260a881@manjusaka.me> References: <20230812201249.62237-1-me@manjusaka.me> <20230812205905.016106c0@rorschach.local.home> <20230812210140.117da558@rorschach.local.home> <20230812210450.53464a78@rorschach.local.home> <6bfa88099fe13b3fd4077bb3a3e55e3ae04c3b5d.camel@perches.com> <20230812215327.1dbd30f3@rorschach.local.home> <8b0f2d2b-c5a0-4654-9cc0-78873260a881@manjusaka.me> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Aug 2023 14:09:06 +0800 Manjusaka wrote: > > +# trace include files use a completely different grammar > > + next if ($realfile =~ m{(?:include/trace/events/|/trace\.h$/)}); > > + > > # check multi-line statement indentation matches previous line > > if ($perl_version_ok && > > $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) { > > > > > > > > Actually, I'm not sure this is the checkpatch style issue or my code style issue. > > Seems wired. The TRACE_EVENT() macro has its own style. I need to document it, and perhaps one day get checkpatch to understand it as well. The TRACE_EVENT() typically looks like: TRACE_EVENT(name, TP_PROTO(int arg1, struct foo *arg2, struct bar *arg3), TP_ARGS(arg1, arg2, arg3), TP_STRUCT__entry( __field( int, field1 ) __array( char, mystring, MYSTRLEN ) __string( filename, arg3->name ) ), TP_fast_assign( __entry->field1 = arg1; memcpy(__entry->mystring, arg2->string); __assign_str(filename, arg3->name); ), TP_printk("field1=%d mystring=%s filename=%s", __entry->field1, __entry->mystring, __get_str(filename)) ); The TP_STRUCT__entry() should be considered more of a "struct" layout than a macro layout, and that's where checkpatch gets confused. The spacing makes it much easier to see the fields and their types. -- Steve