Skip to content

Commit d6c8e94

Browse files
Waiman-Longaxboe
authored andcommitted
blk-iocost: Fix error on iocost_ioc_vrate_adj
Systemtap 4.2 is unable to correctly interpret the "u32 (*missed_ppm)[2]" argument of the iocost_ioc_vrate_adj trace entry defined in include/trace/events/iocost.h leading to the following error: /tmp/stapAcz0G0/stap_c89c58b83cea1724e26395efa9ed4939_6321_aux_6.c:78:8: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token , u32[]* __tracepoint_arg_missed_ppm That argument type is indeed rather complex and hard to read. Looking at block/blk-iocost.c. It is just a 2-entry u32 array. By simplifying the argument to a simple "u32 *missed_ppm" and adjusting the trace entry accordingly, the compilation error was gone. Fixes: 7caa471 ("blkcg: implement blk-iocost") Acked-by: Steven Rostedt (VMware) <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent b849dd8 commit d6c8e94

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

block/blk-iocost.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ static void ioc_timer_fn(struct timer_list *timer)
15911591
vrate_min, vrate_max);
15921592
}
15931593

1594-
trace_iocost_ioc_vrate_adj(ioc, vrate, &missed_ppm, rq_wait_pct,
1594+
trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct,
15951595
nr_lagging, nr_shortages,
15961596
nr_surpluses);
15971597

@@ -1600,7 +1600,7 @@ static void ioc_timer_fn(struct timer_list *timer)
16001600
ioc->period_us * vrate * INUSE_MARGIN_PCT, 100);
16011601
} else if (ioc->busy_level != prev_busy_level || nr_lagging) {
16021602
trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
1603-
&missed_ppm, rq_wait_pct, nr_lagging,
1603+
missed_ppm, rq_wait_pct, nr_lagging,
16041604
nr_shortages, nr_surpluses);
16051605
}
16061606

include/trace/events/iocost.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ DEFINE_EVENT(iocg_inuse_update, iocost_inuse_reset,
130130

131131
TRACE_EVENT(iocost_ioc_vrate_adj,
132132

133-
TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 (*missed_ppm)[2],
133+
TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm,
134134
u32 rq_wait_pct, int nr_lagging, int nr_shortages,
135135
int nr_surpluses),
136136

@@ -155,8 +155,8 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
155155
__entry->old_vrate = atomic64_read(&ioc->vtime_rate);;
156156
__entry->new_vrate = new_vrate;
157157
__entry->busy_level = ioc->busy_level;
158-
__entry->read_missed_ppm = (*missed_ppm)[READ];
159-
__entry->write_missed_ppm = (*missed_ppm)[WRITE];
158+
__entry->read_missed_ppm = missed_ppm[READ];
159+
__entry->write_missed_ppm = missed_ppm[WRITE];
160160
__entry->rq_wait_pct = rq_wait_pct;
161161
__entry->nr_lagging = nr_lagging;
162162
__entry->nr_shortages = nr_shortages;

0 commit comments

Comments
 (0)