aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9639e45f0860..d24101cfc425 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1117,9 +1117,8 @@ trace_entry_idx(struct trace_array *tr, struct trace_array_cpu *data,
1117} 1117}
1118 1118
1119/* Increment the index counter of an iterator by one */ 1119/* Increment the index counter of an iterator by one */
1120static void trace_iterator_increment(struct trace_iterator *iter, int cpu) 1120static void __trace_iterator_increment(struct trace_iterator *iter, int cpu)
1121{ 1121{
1122 iter->idx++;
1123 iter->next_idx[cpu]++; 1122 iter->next_idx[cpu]++;
1124 iter->next_page_idx[cpu]++; 1123 iter->next_page_idx[cpu]++;
1125 1124
@@ -1132,6 +1131,12 @@ static void trace_iterator_increment(struct trace_iterator *iter, int cpu)
1132 } 1131 }
1133} 1132}
1134 1133
1134static void trace_iterator_increment(struct trace_iterator *iter, int cpu)
1135{
1136 iter->idx++;
1137 __trace_iterator_increment(iter, cpu);
1138}
1139
1135static struct trace_entry * 1140static struct trace_entry *
1136trace_entry_next(struct trace_array *tr, struct trace_array_cpu *data, 1141trace_entry_next(struct trace_array *tr, struct trace_array_cpu *data,
1137 struct trace_iterator *iter, int cpu) 1142 struct trace_iterator *iter, int cpu)
@@ -1153,7 +1158,7 @@ trace_entry_next(struct trace_array *tr, struct trace_array_cpu *data,
1153 1158
1154 /* find a real entry */ 1159 /* find a real entry */
1155 do { 1160 do {
1156 trace_iterator_increment(iter, cpu); 1161 __trace_iterator_increment(iter, cpu);
1157 ent = trace_entry_idx(tr, tr->data[cpu], iter, cpu); 1162 ent = trace_entry_idx(tr, tr->data[cpu], iter, cpu);
1158 } while (ent && ent->type != TRACE_CONT); 1163 } while (ent && ent->type != TRACE_CONT);
1159 1164
@@ -1187,7 +1192,7 @@ __find_next_entry(struct trace_iterator *iter, int *ent_cpu, int inc)
1187 ent = trace_entry_next(tr, data, iter, cpu); 1192 ent = trace_entry_next(tr, data, iter, cpu);
1188 else { 1193 else {
1189 while (ent && ent->type == TRACE_CONT) { 1194 while (ent && ent->type == TRACE_CONT) {
1190 trace_iterator_increment(iter, cpu); 1195 __trace_iterator_increment(iter, cpu);
1191 ent = trace_entry_idx(tr, tr->data[cpu], 1196 ent = trace_entry_idx(tr, tr->data[cpu],
1192 iter, cpu); 1197 iter, cpu);
1193 } 1198 }
@@ -1566,7 +1571,7 @@ trace_seq_print_cont(struct trace_seq *s, struct trace_iterator *iter)
1566 1571
1567 do { 1572 do {
1568 trace_seq_printf(s, "%s", ent->cont.buf); 1573 trace_seq_printf(s, "%s", ent->cont.buf);
1569 trace_iterator_increment(iter, iter->cpu); 1574 __trace_iterator_increment(iter, iter->cpu);
1570 ent = trace_entry_idx(tr, data, iter, iter->cpu); 1575 ent = trace_entry_idx(tr, data, iter, iter->cpu);
1571 } while (ent && ent->type == TRACE_CONT); 1576 } while (ent && ent->type == TRACE_CONT);
1572} 1577}