Index: third_party/grpc/src/core/client_config/initial_connect_string.c |
diff --git a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h b/third_party/grpc/src/core/client_config/initial_connect_string.c |
similarity index 65% |
copy from third_party/tcmalloc/vendor/src/base/synchronization_profiling.h |
copy to third_party/grpc/src/core/client_config/initial_connect_string.c |
index cf02c218a111806189f71f7b528a83b5ceb164a4..19afa1675a7b99da4d6b0862ded049122fd1c9ef 100644 |
--- a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h |
+++ b/third_party/grpc/src/core/client_config/initial_connect_string.c |
@@ -1,4 +1,6 @@ |
-/* Copyright (c) 2010, Google Inc. |
+/* |
+ * |
+ * Copyright 2015, Google Inc. |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
@@ -27,24 +29,25 @@ |
* (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/initial_connect_string.h" |
+ |
+#include <stddef.h> |
-#include "base/basictypes.h" |
+extern void grpc_set_default_initial_connect_string(struct sockaddr **addr, |
+ size_t *addr_len, |
+ gpr_slice *initial_str); |
-namespace base { |
+static grpc_set_initial_connect_string_func g_set_initial_connect_string_func = |
+ grpc_set_default_initial_connect_string; |
-// 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_test_set_initial_connect_string_function( |
+ grpc_set_initial_connect_string_func func) { |
+ g_set_initial_connect_string_func = func; |
+} |
-// 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_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, |
+ gpr_slice *initial_str) { |
+ g_set_initial_connect_string_func(addr, addr_len, initial_str); |
} |
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_ |