Index: third_party/grpc/src/core/client_config/connector.c |
diff --git a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h b/third_party/grpc/src/core/client_config/connector.c |
similarity index 64% |
copy from third_party/tcmalloc/chromium/src/base/synchronization_profiling.h |
copy to third_party/grpc/src/core/client_config/connector.c |
index cf02c218a111806189f71f7b528a83b5ceb164a4..aa34aa7fab6d9e09a7f74b94fe183331818530bb 100644 |
--- a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h |
+++ b/third_party/grpc/src/core/client_config/connector.c |
@@ -1,4 +1,6 @@ |
-/* Copyright (c) 2010, Google Inc. |
+/* |
+ * |
+ * Copyright 2015-2016, Google Inc. |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
@@ -27,24 +29,27 @@ |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* |
- * --- |
- * Author: Chris Ruemmler |
*/ |
-#ifndef BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |
-#define BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |
+#include "src/core/client_config/connector.h" |
-#include "base/basictypes.h" |
+grpc_connector* grpc_connector_ref(grpc_connector* connector) { |
+ connector->vtable->ref(connector); |
+ return connector; |
+} |
-namespace base { |
+void grpc_connector_unref(grpc_exec_ctx* exec_ctx, grpc_connector* connector) { |
+ connector->vtable->unref(exec_ctx, connector); |
+} |
-// We can do contention-profiling of SpinLocks, but the code is in |
-// mutex.cc, which is not always linked in with spinlock. Hence we |
-// provide a weak definition, which are used if mutex.cc isn't linked in. |
+void grpc_connector_connect(grpc_exec_ctx* exec_ctx, grpc_connector* connector, |
+ const grpc_connect_in_args* in_args, |
+ grpc_connect_out_args* out_args, |
+ grpc_closure* notify) { |
+ connector->vtable->connect(exec_ctx, connector, in_args, out_args, notify); |
+} |
-// Submit the number of cycles the spinlock spent contending. |
-ATTRIBUTE_WEAK extern void SubmitSpinLockProfileData(const void *, int64); |
-extern void SubmitSpinLockProfileData(const void *contendedlock, |
- int64 wait_cycles) {} |
+void grpc_connector_shutdown(grpc_exec_ctx* exec_ctx, |
+ grpc_connector* connector) { |
+ connector->vtable->shutdown(exec_ctx, connector); |
} |
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |