lkml.org 
[lkml]   [2022]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 21/57] dyndbg: test DECLARE_DYNDBG_CLASSMAP, sysfs nodes
On Sun, Sep 04, 2022 at 03:40:58PM -0600, Jim Cromie wrote:
> Demonstrate use of DECLARE_DYNDBG_CLASSMAP macro, and expose them as
> sysfs-nodes for testing.

Wait, why sysfs?

sysfs isn't for testing, why not use debugfs?


>
> For each of the 4 class-map-types:
>
> - declare a class-map of that type,
> - declare the enum corresponding to those class-names
> - share _base across 0..30 range
> - add a __pr_debug_cls() call for each class-name
> - declare 2 sysnodes for each class-map
> for 'p' flag, and future 'T' flag
>
> These declarations create the following sysfs parameter interface:
>
> :#> pwd
> /sys/module/test_dynamic_debug/parameters
> :#> ls
> T_disjoint_bits T_disjoint_names T_level_names T_level_num do_prints
> p_disjoint_bits p_disjoint_names p_level_names p_level_num

What is in these files?

For sysfs stuff, you need Documentation/ABI entries so that you can't
abuse sysfs. With debugfs, you can do anything you want :)

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-09-07 16:56    [W:0.573 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site