scsi: ufs-debugfs: create statistics folder
In this patch a new folder is created under the debugfs/ufshcd<x> root folder, in which all statistics information is located and collected. Change-Id: I3ea68a7c75b8252b6ad8487ff927e0fe520242e4 Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
This commit is contained in:
parent
d0d9231d23
commit
88abe3727b
2 changed files with 14 additions and 5 deletions
|
@ -1464,22 +1464,30 @@ void ufsdbg_add_debugfs(struct ufs_hba *hba)
|
||||||
goto err_no_root;
|
goto err_no_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hba->debugfs_files.stats_folder = debugfs_create_dir("stats",
|
||||||
|
hba->debugfs_files.debugfs_root);
|
||||||
|
if (!hba->debugfs_files.stats_folder) {
|
||||||
|
dev_err(hba->dev,
|
||||||
|
"%s: NULL stats_folder, exiting", __func__);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
hba->debugfs_files.tag_stats =
|
hba->debugfs_files.tag_stats =
|
||||||
debugfs_create_file("tag_stats", S_IRUSR | S_IWUSR,
|
debugfs_create_file("tag_stats", S_IRUSR | S_IWUSR,
|
||||||
hba->debugfs_files.debugfs_root, hba,
|
hba->debugfs_files.stats_folder, hba,
|
||||||
&ufsdbg_tag_stats_fops);
|
&ufsdbg_tag_stats_fops);
|
||||||
if (!hba->debugfs_files.tag_stats) {
|
if (!hba->debugfs_files.tag_stats) {
|
||||||
dev_err(hba->dev, "%s: NULL tag stats file, exiting",
|
dev_err(hba->dev, "%s: NULL tag_stats file, exiting",
|
||||||
__func__);
|
__func__);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
hba->debugfs_files.err_stats =
|
hba->debugfs_files.err_stats =
|
||||||
debugfs_create_file("err_stats", S_IRUSR | S_IWUSR,
|
debugfs_create_file("err_stats", S_IRUSR | S_IWUSR,
|
||||||
hba->debugfs_files.debugfs_root, hba,
|
hba->debugfs_files.stats_folder, hba,
|
||||||
&ufsdbg_err_stats_fops);
|
&ufsdbg_err_stats_fops);
|
||||||
if (!hba->debugfs_files.err_stats) {
|
if (!hba->debugfs_files.err_stats) {
|
||||||
dev_err(hba->dev, "%s: NULL err stats file, exiting",
|
dev_err(hba->dev, "%s: NULL err_stats file, exiting",
|
||||||
__func__);
|
__func__);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -1561,7 +1569,7 @@ void ufsdbg_add_debugfs(struct ufs_hba *hba)
|
||||||
|
|
||||||
hba->debugfs_files.req_stats =
|
hba->debugfs_files.req_stats =
|
||||||
debugfs_create_file("req_stats", S_IRUSR | S_IWUSR,
|
debugfs_create_file("req_stats", S_IRUSR | S_IWUSR,
|
||||||
hba->debugfs_files.debugfs_root, hba,
|
hba->debugfs_files.stats_folder, hba,
|
||||||
&ufsdbg_req_stats_desc);
|
&ufsdbg_req_stats_desc);
|
||||||
if (!hba->debugfs_files.req_stats) {
|
if (!hba->debugfs_files.req_stats) {
|
||||||
dev_err(hba->dev,
|
dev_err(hba->dev,
|
||||||
|
|
|
@ -464,6 +464,7 @@ struct ufs_uic_err_reg_hist {
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
struct debugfs_files {
|
struct debugfs_files {
|
||||||
struct dentry *debugfs_root;
|
struct dentry *debugfs_root;
|
||||||
|
struct dentry *stats_folder;
|
||||||
struct dentry *tag_stats;
|
struct dentry *tag_stats;
|
||||||
struct dentry *err_stats;
|
struct dentry *err_stats;
|
||||||
struct dentry *show_hba;
|
struct dentry *show_hba;
|
||||||
|
|
Loading…
Add table
Reference in a new issue