Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp429155ybb; Thu, 28 Mar 2019 05:31:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ88mU0LlfJBxgncTitZDWs1BDN9AFw4lnJYYP16LID591HPHc9SGZmObo4sOrobH6+otD X-Received: by 2002:a65:6105:: with SMTP id z5mr9816762pgu.378.1553776312563; Thu, 28 Mar 2019 05:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553776312; cv=none; d=google.com; s=arc-20160816; b=wRnCmr2pWmgmd2RxV4eGbx2ch01/TwNyq8+FwgeYFZdVHdjA8XyaieNd/L2z8Ifw81 U3hi/KFKAdC6kAaxf+ZBy65a1E7iyG1Ljel7RwF/1WiaqJC3lWI16UP9n41Fs5UqylKe NyJ23Ow+Tq/yNlgcuXLtIfrPON9qUkKQ4fXZNFG5lnOeDZCRzwHHtSVO62r0aGnFKDXZ 9ILQo0S4QgjyL52uwQm8tsBPiQT7fir9A63aPkLaJ1iDnQp7MFH6CBdcQrvbRLGBWIHW g+Rsz2WPfcpWh0RxybMMbaQY+9rT0CfuViv/yNZCvgaWKmHiEmiK6miTwWiIeAruzZle SS6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=DwLyCi2B5bPGNgFiEyPWx7DaPM7+1zeFPLt1b74BAEQ=; b=nAuLEC8TOqj+0wVUHsZalpokcQWRdb79UTYQYUECszgJ1KyjAzHAu/ArJBtRob0Cxr PhBShXbDpzNpENJznBuAdcRrYnnbBT2+LTs7EZJIQOanlGWPem0I+J033wlKfEhit5pV Hcv0D6x8ntJH9IfsbPWPYbEVoe70fB0i7N/hRQpyWfQCYIhsPwhhcJnWj6LHvMW/mugj CbK5tQOCC6JH9obLquEg6yP16cxot/2xF/bmcNaTWbWCNyz/QaR3/Z/gzHS8j4xC7Y6f tZmAMS2VVWErjCkddS/yGWVpEWiV3XZatR0riwkRW1qkINrTyuSBhJD9aIJdIwLRZn49 LNMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si22884288pla.80.2019.03.28.05.31.36; Thu, 28 Mar 2019 05:31:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726267AbfC1Maj (ORCPT + 99 others); Thu, 28 Mar 2019 08:30:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:41156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbfC1Maj (ORCPT ); Thu, 28 Mar 2019 08:30:39 -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 DB53B2082F; Thu, 28 Mar 2019 12:30:37 +0000 (UTC) Date: Thu, 28 Mar 2019 08:30:36 -0400 From: Steven Rostedt To: Greg Kroah-Hartman Cc: "Life is hard, and then you die" , Dmitry Torokhov , Henrik Rydberg , Andy Shevchenko , Sergey Senozhatsky , "Rafael J. Wysocki" , Lukas Wunner , Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] driver core: add dev_print_hex_dump() logging function. Message-ID: <20190328083036.7398db1b@gandalf.local.home> In-Reply-To: <20190328112952.GA2232@kroah.com> References: <20190327014807.7472-1-ronald@innovation.ch> <20190327014807.7472-4-ronald@innovation.ch> <20190327023757.GB20766@kroah.com> <20190328002817.GF24753@innovation.ch> <20190328052917.GB18668@kroah.com> <20190328102755.GA26446@innovation.ch> <20190328112952.GA2232@kroah.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Mar 2019 12:29:52 +0100 Greg Kroah-Hartman wrote: > > 3. In at least two places we log different types of packets in the > > same lines of code (protected by a "if (log_mask & PKT_TYPE)") - > > dynamic-debug would only allow enabling or disabling logging of > > all packets. This could be worked around by creating a separate > > (but essentially duplicate) logging function for each packet type > > and some lookup table to call the appropriate one. Not very > > pretty IMO, though. > > True, but you can use tracepoints as well, that would probably be much > easier when you are logging data streams. You can also use an ebpf > program with the tracepoints to log just what you need/want to when you > want to as well. And tracepoints have filters where you don't even need ebpf to do such filtering. See Documentation/trace/events.rst Section 5: Event Filtering -- Steve