Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp11369ybg; Thu, 11 Jun 2020 15:37:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQHN1p+J6qd15/DbH0M9AYW1XgCUhbXTLC+R3j92lvqOSfKLbjya+PGTS+adIL47vAUWnR X-Received: by 2002:a17:906:4c46:: with SMTP id d6mr10085299ejw.503.1591915062245; Thu, 11 Jun 2020 15:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591915062; cv=none; d=google.com; s=arc-20160816; b=MVhdMfHdrryrr6Ymcy6UZ8MYiDmp37k/8CYSOZ+CUVjFfwMaUHkOTlRjjYq/2tTAc4 Lk6p19K7El9LGFD9offkmZHCiZ6rQnjz3SIhuepmzrTpG9joV3OyeZnvrAinIdJDDQzz KLPpEET90HsTjA8U8xi748cWcv/L36Vce56FdKdiOt8REqnShzum0GIPqFtqQzGRdQxn qIkLFY/enDddpNY1Sczr7Y+Itrzh1nlWWZ0cg1+La/56pHuTRtTZ9lv/fI82YP6bJxw7 Gy1dQzn5NnWsvDJqH0hkhWA//jCOVkVoUnqwPv3ZDyb4Pqf2KyUUwHsvrkjdSQaO5OUy vSMg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=5o7owl4V9Akzh9Ty17BbGi44hSOMPVsdGvpRKwTxd78=; b=ssKksJB/hkgwFK8F37JT0cG0FcXKYZr2vJEW1hKg365IPmbma3F3G9yAeg5RViteR7 m/3yqcYfnLYmh86H7JI+ON5eF/li0gU+YMSFq+OccAB2baRICotu2Mw+OoJrMXkCFhH0 WI37wSf8N07IRU1CHBaH31/KPdbgm7oGv8IeuBU17hb7/GMgRP+4DDrK2N+UG96QBHvJ w8Xtl7VrAY0RFluemgbiFyRxkxxE6EDsxakzkiuSZxve035/ZuiGiS0ceAUkkhbw4PyA sh+S4GuSL40rhlvsOlwUnCKUD5mBbnSrxNTnqkrBQ3dJM43VJOvXZvlN+BQq/fI0MY0O Ak9A== 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 m4si3201671ejn.10.2020.06.11.15.37.20; Thu, 11 Jun 2020 15:37:42 -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 S1726353AbgFKWdv (ORCPT + 99 others); Thu, 11 Jun 2020 18:33:51 -0400 Received: from smtprelay0239.hostedemail.com ([216.40.44.239]:43012 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726270AbgFKWdu (ORCPT ); Thu, 11 Jun 2020 18:33:50 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id D65CC18029123; Thu, 11 Jun 2020 22:33:48 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2110:2393:2559:2562:2691:2828:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:4605:5007:6119:7514:7875:7903:8526:9040:10004:10400:10848:11026:11232:11473:11658:11914:12296:12297:12740:12760:12895:13095:13141:13142:13161:13229:13230:13439:14096:14097:14180:14181:14659:14721:21060:21080:21324:21433:21627:21740:21795:21972:21990:30012:30034:30051:30054:30070:30083:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: cakes14_3209fc126dd7 X-Filterd-Recvd-Size: 4066 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf14.hostedemail.com (Postfix) with ESMTPA; Thu, 11 Jun 2020 22:33:46 +0000 (UTC) Message-ID: <3518483f1836bdfbc193292dc1639509ac33fe7c.camel@perches.com> Subject: Re: [PATCH v3 6/7] venus: Make debug infrastructure more flexible From: Joe Perches To: Jason Baron , jim.cromie@gmail.com, Daniel Thompson Cc: Stanimir Varbanov , Greg Kroah-Hartman , Linux Documentation List , LKML , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org Date: Thu, 11 Jun 2020 15:33:45 -0700 In-Reply-To: References: <20200609104604.1594-7-stanimir.varbanov@linaro.org> <20200609111414.GC780233@kroah.com> <20200610133717.GB1906670@kroah.com> <31e1aa72b41f9ff19094476033511442bb6ccda0.camel@perches.com> <2fab7f999a6b5e5354b23d06aea31c5018b9ce18.camel@perches.com> <20200611062648.GA2529349@kroah.com> <20200611105217.73xwkd2yczqotkyo@holly.lan> <20200611121817.narzkqf5x7cvl6hp@holly.lan> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 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, 2020-06-11 at 17:59 -0400, Jason Baron wrote: > > On 6/11/20 5:19 PM, jim.cromie@gmail.com wrote: > > trimmed.. > > > > > > > Currently I think there not enough "levels" to map something like > > > > > drm.debug to the new dyn dbg feature. I don't think it is intrinsic > > > > > but I couldn't find the bit of the code where the 5-bit level in struct > > > > > _ddebug is converted from a mask to a bit number and vice-versa. > > > > > > > > Here [1] is Joe's initial suggestion. But I decided that bitmask is a > > > > good start for the discussion. > > > > > > > > I guess we can add new member uint "level" in struct _ddebug so that we > > > > can cover more "levels" (types, groups). > > > > > > I don't think it is allocating only 5 bits that is the problem! There were 6 unused bits in struct _ddebug; The original idea was to avoid expanding the already somewhat large struct _ddebug uses and the __verbose/__dyndbg section that can have quite a lot of these structs. I imagine adding another int or long wouldn't be too bad. > > > The problem is that those 5 bits need not be encoded as a bitmask by > > > dyndbg, that can simply be the category code for the message. They only > > > need be converted into a mask when we compare them to the mask provided > > > by the user. > > > I also suggested adding a pointer to whatever is provided by the developer so the address of something like MODULE_PARM_DESC(variable, ...) can be also be used. > > heres what I have in mind. whats described here is working. > > I'll send it out soon > > Cool. thanks for working on this! Truly, thank you both Jim and Stanimir. Please remember that dynamic_debug is not required and pr_debug should still work. > > API: > > > > - change pr_debug(...) --> pr_debug_typed(type_id=0, ...) > > - all existing uses have type_id=0 > > - developer creates exclusive types of log messages with type_id>0 > > 1, 2, 3 are disjoint groups, for example: hi, mid, low You could have a u8 for type if there are to be 3 classes bitmask level group by value though I believe group by value might as well just be bitmask and bool is_bitmask is enough (!is_bitmask would be level) cheers, Joe