aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_closure.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-13 12:44:14 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-02-13 12:44:14 -0800
commit4dde8b277d5196962f5c08afd39db94f50242c29 (patch)
treefb39dd7c5621ae3bbc3f2cf441df831e3e501fd2 /test/cpp/microbenchmarks/bm_closure.cc
parent96f8728b06740dd6b63ab463319b4795209dbec4 (diff)
Fix stack corruption
Diffstat (limited to 'test/cpp/microbenchmarks/bm_closure.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_closure.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc
index dac7d9c677..80d6610e13 100644
--- a/test/cpp/microbenchmarks/bm_closure.cc
+++ b/test/cpp/microbenchmarks/bm_closure.cc
@@ -324,7 +324,8 @@ class Rescheduler {
static void BM_ClosureReschedOnExecCtx(benchmark::State& state) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- Rescheduler(state, grpc_schedule_on_exec_ctx).ScheduleFirst(&exec_ctx);
+ Rescheduler r(state, grpc_schedule_on_exec_ctx);
+ r.ScheduleFirst(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
}
BENCHMARK(BM_ClosureReschedOnExecCtx);
@@ -332,8 +333,8 @@ BENCHMARK(BM_ClosureReschedOnExecCtx);
static void BM_ClosureReschedOnCombiner(benchmark::State& state) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_combiner* combiner = grpc_combiner_create(NULL);
- Rescheduler(state, grpc_combiner_scheduler(combiner, false))
- .ScheduleFirst(&exec_ctx);
+ Rescheduler r(state, grpc_combiner_scheduler(combiner, false));
+ r.ScheduleFirst(&exec_ctx);
grpc_exec_ctx_flush(&exec_ctx);
GRPC_COMBINER_UNREF(&exec_ctx, combiner, "finished");
grpc_exec_ctx_finish(&exec_ctx);
@@ -343,9 +344,9 @@ BENCHMARK(BM_ClosureReschedOnCombiner);
static void BM_ClosureReschedOnCombinerFinally(benchmark::State& state) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_combiner* combiner = grpc_combiner_create(NULL);
- Rescheduler(state, grpc_combiner_finally_scheduler(combiner, false))
- .ScheduleFirstAgainstDifferentScheduler(
- &exec_ctx, grpc_combiner_scheduler(combiner, false));
+ Rescheduler r(state, grpc_combiner_finally_scheduler(combiner, false));
+ r.ScheduleFirstAgainstDifferentScheduler(
+ &exec_ctx, grpc_combiner_scheduler(combiner, false));
grpc_exec_ctx_flush(&exec_ctx);
GRPC_COMBINER_UNREF(&exec_ctx, combiner, "finished");
grpc_exec_ctx_finish(&exec_ctx);