Whamcloud - gitweb
LU-14736 utils: update leak-finder.pl for new format 83/43983/10
authorEmoly Liu <emoly@whamcloud.com>
Wed, 11 May 2022 12:12:00 +0000 (20:12 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 17 Nov 2022 06:56:05 +0000 (06:56 +0000)
commit5b998d803ffbd02ed306195d231e0a3478658574
tree8aac29ccde801ea51616fc3df385e11604e326ba
parente834ad5992adef5989332abce1d8eb2102f86cd2
LU-14736 utils: update leak-finder.pl for new format

Update leak-finder.pl to handle some of the newer log formats,
so that it produces more useful results. The changes include:
- add option "--by_func" to sort leak logs by function name in
  ascending order;
- add option "--summary" to print a summary report by the total
  number of leak bytes of each function in ascending order in
  YAML format,
  "- { func: <function_name>, alloc_bytes: <bytes>,
       leak_count: <count>, leak_bytes: <bytes> },"
- define LIBCFS_MEM_MSG() to print alloc/free log in a uniform
  format, as follows, also define LIBCFS_ALLOC_POST() and
  LIBCFS_FREE_PRE():
  mask:subs:cpu:epoch second.usec:?:pid:?:
  (filename:line:function_name()) alloc-type 'var_name': size at
  memory_address
- correct some alloc/free debug messages in lnet part.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Idee539f7aebbd49a52fe5254d292860c283ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/43983
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 files changed:
libcfs/include/libcfs/libcfs_private.h
lnet/include/lnet/lib-lnet.h
lnet/klnds/gnilnd/gnilnd.h
lnet/klnds/gnilnd/gnilnd_cb.c
lnet/klnds/gnilnd/gnilnd_conn.c
lnet/lnet/lib-md.c
lnet/lnet/lib-me.c
lnet/lnet/lib-ptl.c
lnet/lnet/udsp.c
lustre/include/obd_support.h
lustre/mdt/mdt_open.c
lustre/obdclass/genops.c
lustre/tests/leak_finder.pl