aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/oprofile_stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile/oprofile_stats.c')
-rw-r--r--drivers/oprofile/oprofile_stats.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
index 917d28ebeacd..627dce478311 100644
--- a/drivers/oprofile/oprofile_stats.c
+++ b/drivers/oprofile/oprofile_stats.c
@@ -38,7 +38,7 @@ void oprofile_reset_stats(void)
38} 38}
39 39
40 40
41void oprofile_create_stats_files(struct super_block *sb, struct dentry *root) 41void oprofile_create_stats_files(struct dentry *root)
42{ 42{
43 struct oprofile_cpu_buffer *cpu_buf; 43 struct oprofile_cpu_buffer *cpu_buf;
44 struct dentry *cpudir; 44 struct dentry *cpudir;
@@ -46,39 +46,39 @@ void oprofile_create_stats_files(struct super_block *sb, struct dentry *root)
46 char buf[10]; 46 char buf[10];
47 int i; 47 int i;
48 48
49 dir = oprofilefs_mkdir(sb, root, "stats"); 49 dir = oprofilefs_mkdir(root->d_sb, root, "stats");
50 if (!dir) 50 if (!dir)
51 return; 51 return;
52 52
53 for_each_possible_cpu(i) { 53 for_each_possible_cpu(i) {
54 cpu_buf = &per_cpu(op_cpu_buffer, i); 54 cpu_buf = &per_cpu(op_cpu_buffer, i);
55 snprintf(buf, 10, "cpu%d", i); 55 snprintf(buf, 10, "cpu%d", i);
56 cpudir = oprofilefs_mkdir(sb, dir, buf); 56 cpudir = oprofilefs_mkdir(root->d_sb, dir, buf);
57 57
58 /* Strictly speaking access to these ulongs is racy, 58 /* Strictly speaking access to these ulongs is racy,
59 * but we can't simply lock them, and they are 59 * but we can't simply lock them, and they are
60 * informational only. 60 * informational only.
61 */ 61 */
62 oprofilefs_create_ro_ulong(sb, cpudir, "sample_received", 62 oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_received",
63 &cpu_buf->sample_received); 63 &cpu_buf->sample_received);
64 oprofilefs_create_ro_ulong(sb, cpudir, "sample_lost_overflow", 64 oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_lost_overflow",
65 &cpu_buf->sample_lost_overflow); 65 &cpu_buf->sample_lost_overflow);
66 oprofilefs_create_ro_ulong(sb, cpudir, "backtrace_aborted", 66 oprofilefs_create_ro_ulong(root->d_sb, cpudir, "backtrace_aborted",
67 &cpu_buf->backtrace_aborted); 67 &cpu_buf->backtrace_aborted);
68 oprofilefs_create_ro_ulong(sb, cpudir, "sample_invalid_eip", 68 oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_invalid_eip",
69 &cpu_buf->sample_invalid_eip); 69 &cpu_buf->sample_invalid_eip);
70 } 70 }
71 71
72 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm", 72 oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mm",
73 &oprofile_stats.sample_lost_no_mm); 73 &oprofile_stats.sample_lost_no_mm);
74 oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mapping", 74 oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mapping",
75 &oprofile_stats.sample_lost_no_mapping); 75 &oprofile_stats.sample_lost_no_mapping);
76 oprofilefs_create_ro_atomic(sb, dir, "event_lost_overflow", 76 oprofilefs_create_ro_atomic(root->d_sb, dir, "event_lost_overflow",
77 &oprofile_stats.event_lost_overflow); 77 &oprofile_stats.event_lost_overflow);
78 oprofilefs_create_ro_atomic(sb, dir, "bt_lost_no_mapping", 78 oprofilefs_create_ro_atomic(root->d_sb, dir, "bt_lost_no_mapping",
79 &oprofile_stats.bt_lost_no_mapping); 79 &oprofile_stats.bt_lost_no_mapping);
80#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX 80#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
81 oprofilefs_create_ro_atomic(sb, dir, "multiplex_counter", 81 oprofilefs_create_ro_atomic(root->d_sb, dir, "multiplex_counter",
82 &oprofile_stats.multiplex_counter); 82 &oprofile_stats.multiplex_counter);
83#endif 83#endif
84} 84}