From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:43348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbeCVSLX (ORCPT ); Thu, 22 Mar 2018 14:11:23 -0400 Date: Thu, 22 Mar 2018 14:11:19 -0400 From: Steven Rostedt To: Alexei Starovoitov Cc: , , , , , , Subject: Re: [PATCH v3 bpf-next 01/10] treewide: remove struct-pass-by-value from tracepoints arguments Message-ID: <20180322141119.7c876c13@gandalf.local.home> In-Reply-To: <20180322180157.742725-2-ast@fb.com> References: <20180322180157.742725-1-ast@fb.com> <20180322180157.742725-2-ast@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 22 Mar 2018 11:01:48 -0700 Alexei Starovoitov wrote: > From: Alexei Starovoitov > > Fix all tracepoint arguments to pass structures (large and small) by reference > instead of by value. > Avoiding passing large structs by value is a good coding style. > Passing small structs sometimes is beneficial, but in all cases > it makes no difference vs readability of the code. > The subsequent patch enforces that all tracepoints args are either integers > or pointers and fit into 64-bit. But some of these structures are used to force type checking, and are just the same size as a number. That's why they don't have "struct" in front of them. Like pmd_t. Will the subsequent patches really break if the structure itself has one element that is of size long? Just seems to add extra code to pass in an address to something that fits into a single register. -- Steve