OSDN Git Service

lib/ref_tracker: improve printing stats
authorAndrzej Hajda <andrzej.hajda@intel.com>
Fri, 2 Jun 2023 10:21:34 +0000 (12:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 5 Jun 2023 22:28:42 +0000 (15:28 -0700)
commitb6d7c0eb2dcbd238fa233a3a1737654e380e784a
treea11f410b265ed595980304df26f444c9d5b97828
parent7a113ff6355944283402fb617dc97122f68d5a41
lib/ref_tracker: improve printing stats

In case the library is tracking busy subsystem, simply
printing stack for every active reference will spam log
with long, hard to read, redundant stack traces. To improve
readabilty following changes have been made:
- reports are printed per stack_handle - log is more compact,
- added display name for ref_tracker_dir - it will differentiate
  multiple subsystems,
- stack trace is printed indented, in the same printk call,
- info about dropped references is printed as well.

Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ref_tracker.h
lib/ref_tracker.c
lib/test_ref_tracker.c
net/core/dev.c
net/core/net_namespace.c