Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lock_events.c Create Date:2022-07-28 09:55:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Initialize debugfs for the locking event counts.

Proto:static int __init init_lockevent_counts(void)

Type:int

Parameter:Nothing

146  d_counts = debugfs_create_dir(LOCK_EVENTS_DIR, NULL)
149  If Not d_counts Then Go to out
159  When i < # of write lock handoffs cycle
160  If skip_lockevent(When CONFIG_LOCK_EVENT_COUNTS is enabled, event counts of different* types of locks will be reported under the /lock_event_counts/* directory. See lock_events_list.h for the list of available locking* events.* Writing to the special "[i]) Then Continue
162  If Not debugfs_create_file(When CONFIG_LOCK_EVENT_COUNTS is enabled, event counts of different* types of locks will be reported under the /lock_event_counts/* directory. See lock_events_list.h for the list of available locking* events.* Writing to the special "[i], 0400, d_counts, (void * )(long)i, & Debugfs data structures) Then Go to fail_undo
167  If Not debugfs_create_file(When CONFIG_LOCK_EVENT_COUNTS is enabled, event counts of different* types of locks will be reported under the /lock_event_counts/* directory. See lock_events_list.h for the list of available locking* events.* Writing to the special "[LOCKEVENT_reset_cnts], 0200, d_counts, (void * )(long)LOCKEVENT_reset_cnts, & Debugfs data structures) Then Go to fail_undo
172  Return 0
173  fail_undo :
174  debugfs_remove_recursive(d_counts)
175  out :
176  pr_warn("Could not create '%s' debugfs entries\n", LOCK_EVENTS_DIR)
177  Return -ENOMEM