Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1364185pxb; Thu, 7 Oct 2021 06:25:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIHBs1RLPMHYSPvEuChmiNzei671tYc15wylkcmyddMexU8Od+yxZWvappWRTaektWw+v1 X-Received: by 2002:a17:906:9399:: with SMTP id l25mr3072486ejx.363.1633613139971; Thu, 07 Oct 2021 06:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633613139; cv=none; d=google.com; s=arc-20160816; b=BXHe1wCeicqDs2o8Xbwr1NbxELNGjLByqJgcW95W8OVR91jRd4lNMP3xRN9X3GNOiW PxIjK0W+5xh7XIGAwmmKar25fxVzhzkx5XFDbRULN91eLZYZxxU+xQyAnhQoxJe5Dwlf 5Xa97TxFbWgpvHTpLzY2cURSH7+mDvKL3laUxqteNffTmLVzeAeHwLLNhVUVTrAuKFxA AZFO4kKwbDlLWwbe3J8QgfYFYWy3Jb581MN4sfeZGg3PlPm60PbMFWDau7/5KVpGqroX p7BhpU4g8twtreDhN4TRM4nXMxgRDDx9qUeZU1fogzuQCICynoNV3RZL3c4L5efOIygP oCDg== 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=96YeIaMKLMD77pblPFgrZE+kHXcAFW+9f+VRm9iQndE=; b=AOslt3HgFTOGwUq10hUCoMkcXxAOBHSqaf1gySRnLk1rh7vuQJD1GzA45ckfHEDia6 KHdyBw8+YB6IgEWLe48XaNRxv4cGLpEtY2D5E3FJ3WNorN8kcc+hw9MgO/SeZeeXVfvX 2CE+hBuB3znIu2m6zRhNRfIts0Pnm8nThJqJtLXav2WO4UHR7m/kToyxBl8FcKCxamXH i1j1LtsFOLWvtb639nGA4kp/mIlSPtyGbq2LtDui3//xJRAFt4IEeByFB30vNMiHMhiG BDkAxXPfxJ5nF63huh9ziiH5+U1fTEmrUHZVD1i6T1fXXZ4PDJgdFFfH1V4OhH/QundV xUCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si24418966edb.91.2021.10.07.06.25.03; Thu, 07 Oct 2021 06:25:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240938AbhJGNW1 (ORCPT + 99 others); Thu, 7 Oct 2021 09:22:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233155AbhJGNWW (ORCPT ); Thu, 7 Oct 2021 09:22:22 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 34B2E61248; Thu, 7 Oct 2021 13:20:28 +0000 (UTC) Date: Thu, 7 Oct 2021 09:20:26 -0400 From: Steven Rostedt To: William Cohen Cc: mingo@redhat.com, LKML Subject: Re: Reason for unused flags argument in trace_raw_output_* function? Message-ID: <20211007092026.644d25de@gandalf.local.home> In-Reply-To: <4988d521-472f-a50e-4686-52afde08d2e9@redhat.com> References: <4988d521-472f-a50e-4686-52afde08d2e9@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Oct 2021 23:49:22 -0400 William Cohen wrote: > Hi, > > I have some code that analyzes x86_64 binaries > (https://developers.redhat.com/articles/2021/08/09/debugging-function-parameters- > dyninst#liveness_analysis) and list which function parameters are unused. > I noticed that trace_raw_output_* functions have an unused flags > argument. I assume this is is to make the argument list match up with > some other function, but I couldn't see which function(s) the > trace_raw_output_* functions are trying to match up with. Which > functions are the trace_raw_output_* function's arguments trying to match? > The match of other printing functions is in kernel/trace/trace_output.c And is called from kernel/trace/trace.c where one place it does pass in flags: static enum print_line_t print_trace_fmt(struct trace_iterator *iter) { [..] if (event) return event->funcs->trace(iter, sym_flags, event); Now if they are still used, is something we should investigate. This code has changed a lot over the years when that "flags" parameter was introduced. It could now just be a relic from the old implementations. Thanks for pointing this out. If I get time I'll look deeper into it, but feel free to look at it yourself. -- Steve