diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-07-10 22:05:08 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-10 22:05:08 -0400 |
commit | 4862fd6047ed02e2726667c54d35f538eecc56aa (patch) | |
tree | fc97f075946120157c63f48e283a5d753d22763a /include | |
parent | 575a1d4bdfa2ea9fc10733013136145b497e1be0 (diff) |
jbd2: remove jbd2_dev_to_name() from jbd2 tracepoints
Using function calls in TP_printk causes perf heartburn, so print the
MAJOR/MINOR device numbers instead.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/jbd2.h | 6 | ||||
-rw-r--r-- | include/trace/events/jbd2.h | 36 |
2 files changed, 19 insertions, 23 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index d087c2e7b2aa..38f307b8c334 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1329,12 +1329,6 @@ extern int jbd_blocks_per_page(struct inode *inode); | |||
1329 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) | 1329 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) |
1330 | #define JBUFFER_TRACE(jh, info) do {} while (0) | 1330 | #define JBUFFER_TRACE(jh, info) do {} while (0) |
1331 | 1331 | ||
1332 | /* | ||
1333 | * jbd2_dev_to_name is a utility function used by the jbd2 and ext4 | ||
1334 | * tracing infrastructure to map a dev_t to a device name. | ||
1335 | */ | ||
1336 | extern const char *jbd2_dev_to_name(dev_t device); | ||
1337 | |||
1338 | #endif /* __KERNEL__ */ | 1332 | #endif /* __KERNEL__ */ |
1339 | 1333 | ||
1340 | #endif /* _LINUX_JBD2_H */ | 1334 | #endif /* _LINUX_JBD2_H */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index bf16545cc977..75964412ddbb 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -26,8 +26,8 @@ TRACE_EVENT(jbd2_checkpoint, | |||
26 | __entry->result = result; | 26 | __entry->result = result; |
27 | ), | 27 | ), |
28 | 28 | ||
29 | TP_printk("dev %s result %d", | 29 | TP_printk("dev %d,%d result %d", |
30 | jbd2_dev_to_name(__entry->dev), __entry->result) | 30 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->result) |
31 | ); | 31 | ); |
32 | 32 | ||
33 | DECLARE_EVENT_CLASS(jbd2_commit, | 33 | DECLARE_EVENT_CLASS(jbd2_commit, |
@@ -48,9 +48,9 @@ DECLARE_EVENT_CLASS(jbd2_commit, | |||
48 | __entry->transaction = commit_transaction->t_tid; | 48 | __entry->transaction = commit_transaction->t_tid; |
49 | ), | 49 | ), |
50 | 50 | ||
51 | TP_printk("dev %s transaction %d sync %d", | 51 | TP_printk("dev %d,%d transaction %d sync %d", |
52 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | 52 | MAJOR(__entry->dev), MINOR(__entry->dev), |
53 | __entry->sync_commit) | 53 | __entry->transaction, __entry->sync_commit) |
54 | ); | 54 | ); |
55 | 55 | ||
56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, | 56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, |
@@ -100,9 +100,9 @@ TRACE_EVENT(jbd2_end_commit, | |||
100 | __entry->head = journal->j_tail_sequence; | 100 | __entry->head = journal->j_tail_sequence; |
101 | ), | 101 | ), |
102 | 102 | ||
103 | TP_printk("dev %s transaction %d sync %d head %d", | 103 | TP_printk("dev %d,%d transaction %d sync %d head %d", |
104 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | 104 | MAJOR(__entry->dev), MINOR(__entry->dev), |
105 | __entry->sync_commit, __entry->head) | 105 | __entry->transaction, __entry->sync_commit, __entry->head) |
106 | ); | 106 | ); |
107 | 107 | ||
108 | TRACE_EVENT(jbd2_submit_inode_data, | 108 | TRACE_EVENT(jbd2_submit_inode_data, |
@@ -120,8 +120,9 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
120 | __entry->ino = inode->i_ino; | 120 | __entry->ino = inode->i_ino; |
121 | ), | 121 | ), |
122 | 122 | ||
123 | TP_printk("dev %s ino %lu", | 123 | TP_printk("dev %d,%d ino %lu", |
124 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) | 124 | MAJOR(__entry->dev), MINOR(__entry->dev), |
125 | (unsigned long) __entry->ino) | ||
125 | ); | 126 | ); |
126 | 127 | ||
127 | TRACE_EVENT(jbd2_run_stats, | 128 | TRACE_EVENT(jbd2_run_stats, |
@@ -156,9 +157,9 @@ TRACE_EVENT(jbd2_run_stats, | |||
156 | __entry->blocks_logged = stats->rs_blocks_logged; | 157 | __entry->blocks_logged = stats->rs_blocks_logged; |
157 | ), | 158 | ), |
158 | 159 | ||
159 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " | 160 | TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " |
160 | "logging %u handle_count %u blocks %u blocks_logged %u", | 161 | "logging %u handle_count %u blocks %u blocks_logged %u", |
161 | jbd2_dev_to_name(__entry->dev), __entry->tid, | 162 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid, |
162 | jiffies_to_msecs(__entry->wait), | 163 | jiffies_to_msecs(__entry->wait), |
163 | jiffies_to_msecs(__entry->running), | 164 | jiffies_to_msecs(__entry->running), |
164 | jiffies_to_msecs(__entry->locked), | 165 | jiffies_to_msecs(__entry->locked), |
@@ -192,9 +193,9 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
192 | __entry->dropped = stats->cs_dropped; | 193 | __entry->dropped = stats->cs_dropped; |
193 | ), | 194 | ), |
194 | 195 | ||
195 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " | 196 | TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " |
196 | "written %u dropped %u", | 197 | "written %u dropped %u", |
197 | jbd2_dev_to_name(__entry->dev), __entry->tid, | 198 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid, |
198 | jiffies_to_msecs(__entry->chp_time), | 199 | jiffies_to_msecs(__entry->chp_time), |
199 | __entry->forced_to_close, __entry->written, __entry->dropped) | 200 | __entry->forced_to_close, __entry->written, __entry->dropped) |
200 | ); | 201 | ); |
@@ -222,9 +223,10 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
222 | __entry->freed = freed; | 223 | __entry->freed = freed; |
223 | ), | 224 | ), |
224 | 225 | ||
225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", | 226 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", |
226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, | 227 | MAJOR(__entry->dev), MINOR(__entry->dev), |
227 | __entry->first_tid, __entry->block_nr, __entry->freed) | 228 | __entry->tail_sequence, __entry->first_tid, |
229 | __entry->block_nr, __entry->freed) | ||
228 | ); | 230 | ); |
229 | 231 | ||
230 | #endif /* _TRACE_JBD2_H */ | 232 | #endif /* _TRACE_JBD2_H */ |