Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1469137ybt; Thu, 18 Jun 2020 09:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgBfaVPftukb82GY7w8gJL8zm4qz2uFoqmkMmqovnACSkPRrr75QbYF+pqsE5CN1gpHjFy X-Received: by 2002:a17:906:6dcd:: with SMTP id j13mr4386817ejt.131.1592497305240; Thu, 18 Jun 2020 09:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592497305; cv=none; d=google.com; s=arc-20160816; b=ClIxKXrjzJtMRnSl5YFFmmRrE6i8j42eEVaGF2sY1YFFO/qYBFpYwVA0srOMDsorCw yJ2Lx+zeY5FAcECh0FVW/5ayNYVskJCagfPqy1mrzagUULLEC2g19hiUayMkvxKVt2B8 4Xl8Z2AH1F/BuC9CwlYTEJRWMjhNdk7a8t+1bstE1w15iO5i+bmW508gC+aKNnGP1znO jy36Sjgq0G0Ja8G0dd6mzmIVuX6wwhHr1EIA/G3SIIiKa5vCLeHETM9nn6Sxgd3D7fpf IblnD+CFKoMnhFFK3/qMWRtwzCUY6DPZghcLrmcpMQujjIoxDf+vdKoqTYi6g7nd5wxI mEPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RD6bdrQeqnxmjjhDtyroRSVzRoghH9KnRM1lkoNQffY=; b=x0W5OEB7+pE6ptPVNd/odNdVHhn6v9xea7fMOwHr2nXiivOcuwX1cOQ3TTjw5IiJgn zxT3mJoj5OYbbhJg1OIpcXOH327gqtzM6oJeg1e8hikzBHMOvwvijnHNyX0jPDDS/cQe L1+Yt4sSAc1YKumuovT4BMER+lwWrOpBxjTCHBGIsTqbBqJphJuaK4BuLRKKJeKPNelu PCzgheIEEbyvjNvl1tNXORpqjxnw/pD2jOGoqtLaae0z4ZhpaZtpfM0cccv3i3zqKC0X JrIFNn8CHA0W0XewPkJcOMuoHptk6Edg3MzkM/KahB/E6KGV1FRjLuvpQRxZJOwCYfUf HhdA== 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 fi8si2157158ejb.641.2020.06.18.09.21.23; Thu, 18 Jun 2020 09:21:45 -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 S1731766AbgFRQTV (ORCPT + 99 others); Thu, 18 Jun 2020 12:19:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:43058 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbgFRQTQ (ORCPT ); Thu, 18 Jun 2020 12:19:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AD798AC9F; Thu, 18 Jun 2020 16:19:12 +0000 (UTC) Date: Thu, 18 Jun 2020 18:19:12 +0200 From: Petr Mladek To: Jim Cromie Cc: jbaron@akamai.com, linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, gregkh@linuxfoundation.org, linux@rasmusvillemoes.dk, Jonathan Corbet , Andrew Morton , Will Deacon , Orson Zhai , linux-doc@vger.kernel.org Subject: Re: [PATCH v3 20/21] dyndbg: add user-flag, negating-flags, and filtering on flags Message-ID: <20200618161912.GD3617@alley> References: <20200617162536.611386-1-jim.cromie@gmail.com> <20200617162536.611386-23-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617162536.611386-23-jim.cromie@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2020-06-17 10:25:35, Jim Cromie wrote: > 1. Add a user-flag [u] which works like the [pfmlt] flags, but has no > effect on callsite behavior; it allows incremental marking of > arbitrary sets of callsites. > > 2. Add [PFMLTU] flags, which negate their counterparts; P===!p etc. > And in ddebug_read_flags(): > current code does: [pfmltu_] -> flags > copy it to: [PFMLTU_] -> mask > > also disallow both of a pair: ie no 'pP', no true & false. > > 3. Add filtering ops into ddebug_change(), right after all the > callsite-property selections are complete. These filter on the > callsite's current flagstate before applying modflags. > > Why ? > > The u-flag & filter flags > > The 'u' flag lets the user assemble an arbitary set of callsites. > Then using filter flags, user can activate the 'u' callsite set. > > #> echo 'file foo.c +u; file bar.c +u' > control # and repeat > #> echo 'u+p' > control > > Of course, you can continue to just activate your set without ever > marking it 1st, but you could trivially add the markup as you go, then > be able to use it as a constraint later, to undo or modify your set. > > #> echo 'file foo.c +up' >control > .. monitor, debug, finish .. > #> echo 'u-p' >control > > # then later resume > #> echo 'u+p' >control > > # disable some cluttering messages, and remove from u-set > #> echo 'file noisy.c function:jabber_* u-pu' >control > > # for doc, recollection > grep =pu control > my-favorite-callsites > > Note: > > Your flagstate after boot is generally not all =_. -DDEBUG will arm > compiled callsites by default, $builtinmod.dyndbg=+p bootargs can > enable them early, and $module.dyndbg=+p bootargs will arm them when > the module is loaded. But you could manage them with u-flags: > > #> echo '-t' >control # clear t-flag to use it as 2ndary markup > #> echo 'p+ut' >control # mark the boot-enabled set of callsites > #> echo '-p' >control # clean your dmesg -w stream > > ... monitor, debug .. > #> echo 'module of_interest $qterms +pu' >control # build your set of useful debugs > #> echo 'module of_interest $qterms UT+pu' >control # same, but dont alter ut marked set Does anyone requested this feature, please? For me, it is really hard to imagine people using these complex and hacky steps. Not to say that using t-flag as a markup looks like a real hack. People either always need the line number in the kernel log or they do not need it at all. Let me repeat. Please, stop this non-sense. Best Regards, Petr