aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/subchannel.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-04-12 13:21:20 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-05-04 11:35:56 -0700
commit7f51ba8372b05d92e0ee1af91e9591ac28915d80 (patch)
tree5e9c6ff85240fdd102adcf9dcede7edfd4a66353 /src/core/ext/filters/client_channel/subchannel.cc
parent6a14efc0236d8ff723c662305b5e7dac7f0cf491 (diff)
Add GPR_UNLIKELY annotations mainly for the client path in error conditions
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel.cc')
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index d7815fb7e1..234ae49838 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -577,7 +577,7 @@ static bool publish_transport_locked(grpc_subchannel* c) {
grpc_error* error = grpc_channel_stack_builder_finish(
builder, 0, 1, connection_destroy, nullptr,
reinterpret_cast<void**>(&stk));
- if (error != GRPC_ERROR_NONE) {
+ if (GPR_UNLIKELY(error != GRPC_ERROR_NONE)) {
grpc_transport_destroy(c->connecting_result.transport);
gpr_log(GPR_ERROR, "error initializing subchannel stack: %s",
grpc_error_string(error));
@@ -803,7 +803,7 @@ grpc_error* ConnectedSubchannel::CreateCall(const CallArgs& args,
};
grpc_error* error = grpc_call_stack_init(
channel_stack_, 1, subchannel_call_destroy, *call, &call_args);
- if (error != GRPC_ERROR_NONE) {
+ if (GPR_UNLIKELY(error != GRPC_ERROR_NONE)) {
const char* error_string = grpc_error_string(error);
gpr_log(GPR_ERROR, "error: %s", error_string);
return error;