182744510Sopenharmony_cidiff -Naur grpc-1.41.1/src/core/lib/debug/stats_data.cc third_party_grpc_sxy/src/core/lib/debug/stats_data.cc 282744510Sopenharmony_ci--- grpc-1.41.1/src/core/lib/debug/stats_data.cc 2021-10-20 04:14:40.000000000 +0800 382744510Sopenharmony_ci+++ third_party_grpc_sxy/src/core/lib/debug/stats_data.cc 2023-04-20 14:24:54.000000000 +0800 482744510Sopenharmony_ci@@ -282,8 +282,8 @@ 582744510Sopenharmony_ci "Number of streams terminated per TCP write", 682744510Sopenharmony_ci "Number of flow control updates written per TCP write", 782744510Sopenharmony_ci // NOLINTNEXTLINE(bugprone-suspicious-missing-comma) 882744510Sopenharmony_ci- "How many completion queues were checked looking for a CQ that had " 982744510Sopenharmony_ci- "requested the incoming call", 1082744510Sopenharmony_ci+ ("How many completion queues were checked looking for a CQ that had " 1182744510Sopenharmony_ci+ "requested the incoming call"), 1282744510Sopenharmony_ci }; 1382744510Sopenharmony_ci const int grpc_stats_table_0[65] = { 1482744510Sopenharmony_ci 0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 1582744510Sopenharmony_cidiff -Naur grpc-1.41.1/src/core/lib/debug/trace.cc third_party_grpc_sxy/src/core/lib/debug/trace.cc 1682744510Sopenharmony_ci--- grpc-1.41.1/src/core/lib/debug/trace.cc 2021-10-20 04:14:40.000000000 +0800 1782744510Sopenharmony_ci+++ third_party_grpc_sxy/src/core/lib/debug/trace.cc 2023-04-20 14:24:54.000000000 +0800 1882744510Sopenharmony_ci@@ -40,45 +40,51 @@ 1982744510Sopenharmony_ci TraceFlag* TraceFlagList::root_tracer_ = nullptr; 2082744510Sopenharmony_ci 2182744510Sopenharmony_ci bool TraceFlagList::Set(const char* name, bool enabled) { 2282744510Sopenharmony_ci- TraceFlag* t; 2382744510Sopenharmony_ci- if (0 == strcmp(name, "all")) { 2482744510Sopenharmony_ci- for (t = root_tracer_; t; t = t->next_tracer_) { 2582744510Sopenharmony_ci+ if (0 == strlen(name)) { 2682744510Sopenharmony_ci+ gpr_log(GPR_DEBUG, "No trace flags are changed"); 2782744510Sopenharmony_ci+ } else if (0 == strcmp(name, "all")) { 2882744510Sopenharmony_ci+ for (auto t = root_tracer_; t != nullptr; t = t->next_tracer_) { 2982744510Sopenharmony_ci t->set_enabled(enabled); 3082744510Sopenharmony_ci } 3182744510Sopenharmony_ci } else if (0 == strcmp(name, "list_tracers")) { 3282744510Sopenharmony_ci LogAllTracers(); 3382744510Sopenharmony_ci } else if (0 == strcmp(name, "refcount")) { 3482744510Sopenharmony_ci- for (t = root_tracer_; t; t = t->next_tracer_) { 3582744510Sopenharmony_ci+ for (auto t = root_tracer_; t != nullptr; t = t->next_tracer_) { 3682744510Sopenharmony_ci if (strstr(t->name_, "refcount") != nullptr) { 3782744510Sopenharmony_ci t->set_enabled(enabled); 3882744510Sopenharmony_ci+ break; 3982744510Sopenharmony_ci } 4082744510Sopenharmony_ci } 4182744510Sopenharmony_ci } else { 4282744510Sopenharmony_ci- bool found = false; 4382744510Sopenharmony_ci- for (t = root_tracer_; t; t = t->next_tracer_) { 4482744510Sopenharmony_ci+ for (auto t = root_tracer_; t != nullptr; t = t->next_tracer_) { 4582744510Sopenharmony_ci if (0 == strcmp(name, t->name_)) { 4682744510Sopenharmony_ci t->set_enabled(enabled); 4782744510Sopenharmony_ci- found = true; 4882744510Sopenharmony_ci+ return true; 4982744510Sopenharmony_ci } 5082744510Sopenharmony_ci } 5182744510Sopenharmony_ci // check for unknowns, but ignore "", to allow to GRPC_TRACE= 5282744510Sopenharmony_ci- if (!found && 0 != strcmp(name, "")) { 5382744510Sopenharmony_ci- gpr_log(GPR_ERROR, "Unknown trace var: '%s'", name); 5482744510Sopenharmony_ci- return false; /* early return */ 5582744510Sopenharmony_ci- } 5682744510Sopenharmony_ci+ gpr_log(GPR_ERROR, "Unknown trace var: '%s'", name); 5782744510Sopenharmony_ci+ return false; /* early return */ 5882744510Sopenharmony_ci } 5982744510Sopenharmony_ci return true; 6082744510Sopenharmony_ci } 6182744510Sopenharmony_ci 6282744510Sopenharmony_ci void TraceFlagList::Add(TraceFlag* flag) { 6382744510Sopenharmony_ci+ gpr_log(GPR_DEBUG, "Add tracer:\t%s", flag->name_); 6482744510Sopenharmony_ci+ // prevent cycles at 'Add' flag to 'root_tracer_' 6582744510Sopenharmony_ci+ for (auto t = root_tracer_; t != nullptr; t = t->next_tracer_) { 6682744510Sopenharmony_ci+ // check if flag is already part of 'root_tracer_' 6782744510Sopenharmony_ci+ if (t == flag) { 6882744510Sopenharmony_ci+ return; 6982744510Sopenharmony_ci+ } 7082744510Sopenharmony_ci+ } 7182744510Sopenharmony_ci flag->next_tracer_ = root_tracer_; 7282744510Sopenharmony_ci root_tracer_ = flag; 7382744510Sopenharmony_ci } 7482744510Sopenharmony_ci 7582744510Sopenharmony_ci void TraceFlagList::LogAllTracers() { 7682744510Sopenharmony_ci gpr_log(GPR_DEBUG, "available tracers:"); 7782744510Sopenharmony_ci- TraceFlag* t; 7882744510Sopenharmony_ci- for (t = root_tracer_; t != nullptr; t = t->next_tracer_) { 7982744510Sopenharmony_ci+ for (auto t = root_tracer_; t != nullptr; t = t->next_tracer_) { 8082744510Sopenharmony_ci gpr_log(GPR_DEBUG, "\t%s", t->name_); 8182744510Sopenharmony_ci } 8282744510Sopenharmony_ci } 83