| Index: third_party/grpc/test/core/iomgr/endpoint_tests.h
|
| diff --git a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h b/third_party/grpc/test/core/iomgr/endpoint_tests.h
|
| similarity index 67%
|
| copy from third_party/tcmalloc/vendor/src/base/synchronization_profiling.h
|
| copy to third_party/grpc/test/core/iomgr/endpoint_tests.h
|
| index cf02c218a111806189f71f7b528a83b5ceb164a4..8ea47e345cf5b9aacd51e5f972a1603a44a29b56 100644
|
| --- a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h
|
| +++ b/third_party/grpc/test/core/iomgr/endpoint_tests.h
|
| @@ -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,30 @@
|
| * (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_
|
| +#ifndef GRPC_TEST_CORE_IOMGR_ENDPOINT_TESTS_H
|
| +#define GRPC_TEST_CORE_IOMGR_ENDPOINT_TESTS_H
|
| +
|
| +#include <sys/types.h>
|
| +
|
| +#include "src/core/iomgr/endpoint.h"
|
| +
|
| +typedef struct grpc_endpoint_test_config grpc_endpoint_test_config;
|
| +typedef struct grpc_endpoint_test_fixture grpc_endpoint_test_fixture;
|
|
|
| -#include "base/basictypes.h"
|
| +struct grpc_endpoint_test_fixture {
|
| + grpc_endpoint *client_ep;
|
| + grpc_endpoint *server_ep;
|
| +};
|
|
|
| -namespace base {
|
| +struct grpc_endpoint_test_config {
|
| + const char *name;
|
| + grpc_endpoint_test_fixture (*create_fixture)(size_t slice_size);
|
| + void (*clean_up)();
|
| +};
|
|
|
| -// 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_endpoint_tests(grpc_endpoint_test_config config,
|
| + grpc_pollset *pollset, gpr_mu *mu);
|
|
|
| -// 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) {}
|
| -}
|
| -#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
|
| +#endif /* GRPC_TEST_CORE_IOMGR_ENDPOINT_TESTS_H */
|
|
|