diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-05-15 23:58:49 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-06-01 19:17:17 -0400 |
commit | 0d64f8342de26d02451900b1aad94716fe92c4ab (patch) | |
tree | b74741815a673be584141dcd3691daaeea0fc053 /kernel/trace/trace_stat.c | |
parent | f3c4ae26e93d354152196b62797ba86ad86dd0cc (diff) |
tracing/stat: replace trace_stat_session by stat_session
The "trace" prefix in struct trace_stat_session type is annoying while
reading the trace_stat.c file. It makes the lines longer, and
is not that much useful to explain the sense of this type.
Just keep "struct stat_session" for this type.
[ Impact: make the code a bit more readable ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_stat.c')
-rw-r--r-- | kernel/trace/trace_stat.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c index fdde3a4a94cd..3b6816be825d 100644 --- a/kernel/trace/trace_stat.c +++ b/kernel/trace/trace_stat.c | |||
@@ -22,7 +22,7 @@ struct trace_stat_list { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* A stat session is the stats output in one file */ | 24 | /* A stat session is the stats output in one file */ |
25 | struct tracer_stat_session { | 25 | struct stat_session { |
26 | struct list_head session_list; | 26 | struct list_head session_list; |
27 | struct tracer_stat *ts; | 27 | struct tracer_stat *ts; |
28 | struct list_head stat_list; | 28 | struct list_head stat_list; |
@@ -38,7 +38,7 @@ static DEFINE_MUTEX(all_stat_sessions_mutex); | |||
38 | static struct dentry *stat_dir; | 38 | static struct dentry *stat_dir; |
39 | 39 | ||
40 | 40 | ||
41 | static void reset_stat_session(struct tracer_stat_session *session) | 41 | static void reset_stat_session(struct stat_session *session) |
42 | { | 42 | { |
43 | struct trace_stat_list *node, *next; | 43 | struct trace_stat_list *node, *next; |
44 | 44 | ||
@@ -48,7 +48,7 @@ static void reset_stat_session(struct tracer_stat_session *session) | |||
48 | INIT_LIST_HEAD(&session->stat_list); | 48 | INIT_LIST_HEAD(&session->stat_list); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void destroy_session(struct tracer_stat_session *session) | 51 | static void destroy_session(struct stat_session *session) |
52 | { | 52 | { |
53 | debugfs_remove(session->file); | 53 | debugfs_remove(session->file); |
54 | reset_stat_session(session); | 54 | reset_stat_session(session); |
@@ -71,7 +71,7 @@ static int dummy_cmp(void *p1, void *p2) | |||
71 | * All of these copies and sorting are required on all opening | 71 | * All of these copies and sorting are required on all opening |
72 | * since the stats could have changed between two file sessions. | 72 | * since the stats could have changed between two file sessions. |
73 | */ | 73 | */ |
74 | static int stat_seq_init(struct tracer_stat_session *session) | 74 | static int stat_seq_init(struct stat_session *session) |
75 | { | 75 | { |
76 | struct trace_stat_list *iter_entry, *new_entry; | 76 | struct trace_stat_list *iter_entry, *new_entry; |
77 | struct tracer_stat *ts = session->ts; | 77 | struct tracer_stat *ts = session->ts; |
@@ -154,7 +154,7 @@ exit_free_list: | |||
154 | 154 | ||
155 | static void *stat_seq_start(struct seq_file *s, loff_t *pos) | 155 | static void *stat_seq_start(struct seq_file *s, loff_t *pos) |
156 | { | 156 | { |
157 | struct tracer_stat_session *session = s->private; | 157 | struct stat_session *session = s->private; |
158 | 158 | ||
159 | /* Prevent from tracer switch or stat_list modification */ | 159 | /* Prevent from tracer switch or stat_list modification */ |
160 | mutex_lock(&session->stat_mutex); | 160 | mutex_lock(&session->stat_mutex); |
@@ -168,7 +168,7 @@ static void *stat_seq_start(struct seq_file *s, loff_t *pos) | |||
168 | 168 | ||
169 | static void *stat_seq_next(struct seq_file *s, void *p, loff_t *pos) | 169 | static void *stat_seq_next(struct seq_file *s, void *p, loff_t *pos) |
170 | { | 170 | { |
171 | struct tracer_stat_session *session = s->private; | 171 | struct stat_session *session = s->private; |
172 | 172 | ||
173 | if (p == SEQ_START_TOKEN) | 173 | if (p == SEQ_START_TOKEN) |
174 | return seq_list_start(&session->stat_list, *pos); | 174 | return seq_list_start(&session->stat_list, *pos); |
@@ -178,13 +178,13 @@ static void *stat_seq_next(struct seq_file *s, void *p, loff_t *pos) | |||
178 | 178 | ||
179 | static void stat_seq_stop(struct seq_file *s, void *p) | 179 | static void stat_seq_stop(struct seq_file *s, void *p) |
180 | { | 180 | { |
181 | struct tracer_stat_session *session = s->private; | 181 | struct stat_session *session = s->private; |
182 | mutex_unlock(&session->stat_mutex); | 182 | mutex_unlock(&session->stat_mutex); |
183 | } | 183 | } |
184 | 184 | ||
185 | static int stat_seq_show(struct seq_file *s, void *v) | 185 | static int stat_seq_show(struct seq_file *s, void *v) |
186 | { | 186 | { |
187 | struct tracer_stat_session *session = s->private; | 187 | struct stat_session *session = s->private; |
188 | struct trace_stat_list *l = list_entry(v, struct trace_stat_list, list); | 188 | struct trace_stat_list *l = list_entry(v, struct trace_stat_list, list); |
189 | 189 | ||
190 | if (v == SEQ_START_TOKEN) | 190 | if (v == SEQ_START_TOKEN) |
@@ -205,7 +205,7 @@ static int tracing_stat_open(struct inode *inode, struct file *file) | |||
205 | { | 205 | { |
206 | int ret; | 206 | int ret; |
207 | 207 | ||
208 | struct tracer_stat_session *session = inode->i_private; | 208 | struct stat_session *session = inode->i_private; |
209 | 209 | ||
210 | ret = seq_open(file, &trace_stat_seq_ops); | 210 | ret = seq_open(file, &trace_stat_seq_ops); |
211 | if (!ret) { | 211 | if (!ret) { |
@@ -222,7 +222,7 @@ static int tracing_stat_open(struct inode *inode, struct file *file) | |||
222 | */ | 222 | */ |
223 | static int tracing_stat_release(struct inode *i, struct file *f) | 223 | static int tracing_stat_release(struct inode *i, struct file *f) |
224 | { | 224 | { |
225 | struct tracer_stat_session *session = i->i_private; | 225 | struct stat_session *session = i->i_private; |
226 | 226 | ||
227 | mutex_lock(&session->stat_mutex); | 227 | mutex_lock(&session->stat_mutex); |
228 | reset_stat_session(session); | 228 | reset_stat_session(session); |
@@ -251,7 +251,7 @@ static int tracing_stat_init(void) | |||
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | 253 | ||
254 | static int init_stat_file(struct tracer_stat_session *session) | 254 | static int init_stat_file(struct stat_session *session) |
255 | { | 255 | { |
256 | if (!stat_dir && tracing_stat_init()) | 256 | if (!stat_dir && tracing_stat_init()) |
257 | return -ENODEV; | 257 | return -ENODEV; |
@@ -266,7 +266,7 @@ static int init_stat_file(struct tracer_stat_session *session) | |||
266 | 266 | ||
267 | int register_stat_tracer(struct tracer_stat *trace) | 267 | int register_stat_tracer(struct tracer_stat *trace) |
268 | { | 268 | { |
269 | struct tracer_stat_session *session, *node, *tmp; | 269 | struct stat_session *session, *node, *tmp; |
270 | int ret; | 270 | int ret; |
271 | 271 | ||
272 | if (!trace) | 272 | if (!trace) |
@@ -286,7 +286,7 @@ int register_stat_tracer(struct tracer_stat *trace) | |||
286 | mutex_unlock(&all_stat_sessions_mutex); | 286 | mutex_unlock(&all_stat_sessions_mutex); |
287 | 287 | ||
288 | /* Init the session */ | 288 | /* Init the session */ |
289 | session = kmalloc(sizeof(struct tracer_stat_session), GFP_KERNEL); | 289 | session = kmalloc(sizeof(struct stat_session), GFP_KERNEL); |
290 | if (!session) | 290 | if (!session) |
291 | return -ENOMEM; | 291 | return -ENOMEM; |
292 | 292 | ||
@@ -312,7 +312,7 @@ int register_stat_tracer(struct tracer_stat *trace) | |||
312 | 312 | ||
313 | void unregister_stat_tracer(struct tracer_stat *trace) | 313 | void unregister_stat_tracer(struct tracer_stat *trace) |
314 | { | 314 | { |
315 | struct tracer_stat_session *node, *tmp; | 315 | struct stat_session *node, *tmp; |
316 | 316 | ||
317 | mutex_lock(&all_stat_sessions_mutex); | 317 | mutex_lock(&all_stat_sessions_mutex); |
318 | list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) { | 318 | list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) { |