.. | .. |
---|
72 | 72 | struct blk_io_trace *t; |
---|
73 | 73 | struct ring_buffer_event *event = NULL; |
---|
74 | 74 | struct trace_buffer *buffer = NULL; |
---|
75 | | - unsigned int trace_ctx = 0; |
---|
| 75 | + int pc = 0; |
---|
76 | 76 | int cpu = smp_processor_id(); |
---|
77 | 77 | bool blk_tracer = blk_tracer_enabled; |
---|
78 | 78 | ssize_t cgid_len = cgid ? sizeof(cgid) : 0; |
---|
79 | 79 | |
---|
80 | 80 | if (blk_tracer) { |
---|
81 | 81 | buffer = blk_tr->array_buffer.buffer; |
---|
82 | | - trace_ctx = tracing_gen_ctx_flags(0); |
---|
| 82 | + pc = preempt_count(); |
---|
83 | 83 | event = trace_buffer_lock_reserve(buffer, TRACE_BLK, |
---|
84 | 84 | sizeof(*t) + len + cgid_len, |
---|
85 | | - trace_ctx); |
---|
| 85 | + 0, pc); |
---|
86 | 86 | if (!event) |
---|
87 | 87 | return; |
---|
88 | 88 | t = ring_buffer_event_data(event); |
---|
.. | .. |
---|
107 | 107 | memcpy((void *) t + sizeof(*t) + cgid_len, data, len); |
---|
108 | 108 | |
---|
109 | 109 | if (blk_tracer) |
---|
110 | | - trace_buffer_unlock_commit(blk_tr, buffer, event, trace_ctx); |
---|
| 110 | + trace_buffer_unlock_commit(blk_tr, buffer, event, 0, pc); |
---|
111 | 111 | } |
---|
112 | 112 | } |
---|
113 | 113 | |
---|
.. | .. |
---|
222 | 222 | struct blk_io_trace *t; |
---|
223 | 223 | unsigned long flags = 0; |
---|
224 | 224 | unsigned long *sequence; |
---|
225 | | - unsigned int trace_ctx = 0; |
---|
226 | 225 | pid_t pid; |
---|
227 | | - int cpu; |
---|
| 226 | + int cpu, pc = 0; |
---|
228 | 227 | bool blk_tracer = blk_tracer_enabled; |
---|
229 | 228 | ssize_t cgid_len = cgid ? sizeof(cgid) : 0; |
---|
230 | 229 | |
---|
.. | .. |
---|
253 | 252 | tracing_record_cmdline(current); |
---|
254 | 253 | |
---|
255 | 254 | buffer = blk_tr->array_buffer.buffer; |
---|
256 | | - trace_ctx = tracing_gen_ctx_flags(0); |
---|
| 255 | + pc = preempt_count(); |
---|
257 | 256 | event = trace_buffer_lock_reserve(buffer, TRACE_BLK, |
---|
258 | 257 | sizeof(*t) + pdu_len + cgid_len, |
---|
259 | | - trace_ctx); |
---|
| 258 | + 0, pc); |
---|
260 | 259 | if (!event) |
---|
261 | 260 | return; |
---|
262 | 261 | t = ring_buffer_event_data(event); |
---|
.. | .. |
---|
302 | 301 | memcpy((void *)t + sizeof(*t) + cgid_len, pdu_data, pdu_len); |
---|
303 | 302 | |
---|
304 | 303 | if (blk_tracer) { |
---|
305 | | - trace_buffer_unlock_commit(blk_tr, buffer, event, trace_ctx); |
---|
| 304 | + trace_buffer_unlock_commit(blk_tr, buffer, event, 0, pc); |
---|
306 | 305 | return; |
---|
307 | 306 | } |
---|
308 | 307 | } |
---|