aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-05-11 11:54:41 -0400
committerGravatar ncteisen <ncteisen@gmail.com>2018-05-17 15:07:51 -0700
commitbba8840a4bfd0696ef257b5cce9ded4119aae9a6 (patch)
tree8379ea07eb322ad81f59d566d178f6d65f9a30d1 /src/core
parent10470bb4a0881e9f7d82cf88c448bfc6417d0ed0 (diff)
Change filename to channelz
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lib/channel/channel_trace.cc6
-rw-r--r--src/core/lib/channel/channelz_registry.cc (renamed from src/core/lib/channel/channel_trace_registry.cc)12
-rw-r--r--src/core/lib/channel/channelz_registry.h (renamed from src/core/lib/channel/channel_trace_registry.h)16
-rw-r--r--src/core/lib/surface/init.cc6
4 files changed, 20 insertions, 20 deletions
diff --git a/src/core/lib/channel/channel_trace.cc b/src/core/lib/channel/channel_trace.cc
index 654300cd32..8665e01776 100644
--- a/src/core/lib/channel/channel_trace.cc
+++ b/src/core/lib/channel/channel_trace.cc
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <string.h>
-#include "src/core/lib/channel/channel_trace_registry.h"
+#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
@@ -70,7 +70,7 @@ ChannelTrace::ChannelTrace(size_t max_events)
tail_trace_(nullptr) {
if (max_list_size_ == 0) return; // tracing is disabled if max_events == 0
gpr_mu_init(&tracer_mu_);
- channel_uuid_ = grpc_channel_trace_registry_register_channel_trace(this);
+ channel_uuid_ = grpc_channelz_registry_register_channel_trace(this);
time_created_ = grpc_millis_to_timespec(grpc_core::ExecCtx::Get()->Now(),
GPR_CLOCK_REALTIME);
}
@@ -83,7 +83,7 @@ ChannelTrace::~ChannelTrace() {
it = it->next();
Delete<TraceEvent>(to_free);
}
- grpc_channel_trace_registry_unregister_channel_trace(channel_uuid_);
+ grpc_channelz_registry_unregister_channel_trace(channel_uuid_);
gpr_mu_destroy(&tracer_mu_);
}
diff --git a/src/core/lib/channel/channel_trace_registry.cc b/src/core/lib/channel/channelz_registry.cc
index 6c82431467..77e23bf69b 100644
--- a/src/core/lib/channel/channel_trace_registry.cc
+++ b/src/core/lib/channel/channelz_registry.cc
@@ -20,7 +20,7 @@
#include "src/core/lib/avl/avl.h"
#include "src/core/lib/channel/channel_trace.h"
-#include "src/core/lib/channel/channel_trace_registry.h"
+#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/gpr/useful.h"
#include <grpc/support/alloc.h>
@@ -45,17 +45,17 @@ static const grpc_avl_vtable avl_vtable = {
destroy_intptr, copy_intptr, compare_intptr, destroy_channel_trace,
copy_channel_trace};
-void grpc_channel_trace_registry_init() {
+void grpc_channelz_registry_init() {
gpr_mu_init(&g_mu);
g_avl = grpc_avl_create(&avl_vtable);
}
-void grpc_channel_trace_registry_shutdown() {
+void grpc_channelz_registry_shutdown() {
grpc_avl_unref(g_avl, nullptr);
gpr_mu_destroy(&g_mu);
}
-intptr_t grpc_channel_trace_registry_register_channel_trace(
+intptr_t grpc_channelz_registry_register_channel_trace(
grpc_core::ChannelTrace* channel_trace) {
intptr_t prior = gpr_atm_no_barrier_fetch_add(&g_uuid, 1);
gpr_mu_lock(&g_mu);
@@ -64,13 +64,13 @@ intptr_t grpc_channel_trace_registry_register_channel_trace(
return prior;
}
-void grpc_channel_trace_registry_unregister_channel_trace(intptr_t uuid) {
+void grpc_channelz_registry_unregister_channel_trace(intptr_t uuid) {
gpr_mu_lock(&g_mu);
g_avl = grpc_avl_remove(g_avl, (void*)uuid, nullptr);
gpr_mu_unlock(&g_mu);
}
-grpc_core::ChannelTrace* grpc_channel_trace_registry_get_channel_trace(
+grpc_core::ChannelTrace* grpc_channelz_registry_get_channel_trace(
intptr_t uuid) {
gpr_mu_lock(&g_mu);
grpc_core::ChannelTrace* ret = static_cast<grpc_core::ChannelTrace*>(
diff --git a/src/core/lib/channel/channel_trace_registry.h b/src/core/lib/channel/channelz_registry.h
index 391ecba7de..1f7501a31e 100644
--- a/src/core/lib/channel/channel_trace_registry.h
+++ b/src/core/lib/channel/channelz_registry.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H
-#define GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H
+#ifndef GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H
+#define GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H
#include <grpc/impl/codegen/port_platform.h>
@@ -27,17 +27,17 @@
// TODO(ncteisen): convert this file to C++
-void grpc_channel_trace_registry_init();
-void grpc_channel_trace_registry_shutdown();
+void grpc_channelz_registry_init();
+void grpc_channelz_registry_shutdown();
// globally registers a ChannelTrace. Returns its unique uuid
-intptr_t grpc_channel_trace_registry_register_channel_trace(
+intptr_t grpc_channelz_registry_register_channel_trace(
grpc_core::ChannelTrace* channel_trace);
// globally unregisters the ChannelTrace that is associated to uuid.
-void grpc_channel_trace_registry_unregister_channel_trace(intptr_t uuid);
+void grpc_channelz_registry_unregister_channel_trace(intptr_t uuid);
// if object with uuid has previously been registered, returns the ChannelTrace
// associated with that uuid. Else returns nullptr.
-grpc_core::ChannelTrace* grpc_channel_trace_registry_get_channel_trace(
+grpc_core::ChannelTrace* grpc_channelz_registry_get_channel_trace(
intptr_t uuid);
-#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H */
+#endif /* GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H */
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc
index a14f77e346..cbc7c2dc96 100644
--- a/src/core/lib/surface/init.cc
+++ b/src/core/lib/surface/init.cc
@@ -27,7 +27,7 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/channel_trace_registry.h"
+#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/channel/handshaker_registry.h"
#include "src/core/lib/debug/stats.h"
@@ -127,7 +127,7 @@ void grpc_init(void) {
grpc_slice_intern_init();
grpc_mdctx_global_init();
grpc_channel_init_init();
- grpc_channel_trace_registry_init();
+ grpc_channelz_registry_init();
grpc_security_pre_init();
grpc_core::ExecCtx::GlobalInit();
grpc_iomgr_init();
@@ -176,7 +176,7 @@ void grpc_shutdown(void) {
grpc_mdctx_global_shutdown();
grpc_handshaker_factory_registry_shutdown();
grpc_slice_intern_shutdown();
- grpc_channel_trace_registry_shutdown();
+ grpc_channelz_registry_shutdown();
grpc_stats_shutdown();
grpc_core::Fork::GlobalShutdown();
}