Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: third_party/grpc/src/core/census/operation.c

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/grpc/src/core/census/mlog.c ('k') | third_party/grpc/src/core/census/placeholders.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/src/core/census/operation.c
diff --git a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h b/third_party/grpc/src/core/census/operation.c
similarity index 60%
copy from third_party/tcmalloc/chromium/src/base/synchronization_profiling.h
copy to third_party/grpc/src/core/census/operation.c
index cf02c218a111806189f71f7b528a83b5ceb164a4..5c587043721e6ca2ade71a5c338682c993adcbda 100644
--- a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h
+++ b/third_party/grpc/src/core/census/operation.c
@@ -1,4 +1,5 @@
-/* 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 +28,36 @@
* (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 <grpc/census.h>
-#include "base/basictypes.h"
+/* TODO(aveitch): These are all placeholder implementations. */
-namespace base {
+census_timestamp census_start_rpc_op_timestamp(void) {
+ census_timestamp ct;
+ /* TODO(aveitch): assumes gpr_timespec implementation of census_timestamp. */
+ ct.ts = gpr_now(GPR_CLOCK_MONOTONIC);
+ return ct;
+}
-// 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.
+census_context *census_start_client_rpc_op(
+ const census_context *context, int64_t rpc_name_id,
+ const census_rpc_name_info *rpc_name_info, const char *peer, int trace_mask,
+ const census_timestamp *start_time) {
+ return NULL;
+}
-// 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) {}
+census_context *census_start_server_rpc_op(
+ const char *buffer, int64_t rpc_name_id,
+ const census_rpc_name_info *rpc_name_info, const char *peer, int trace_mask,
+ census_timestamp *start_time) {
+ return NULL;
}
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
+
+census_context *census_start_op(census_context *context, const char *family,
+ const char *name, int trace_mask) {
+ return NULL;
+}
+
+void census_end_op(census_context *context, int status) {}
« no previous file with comments | « third_party/grpc/src/core/census/mlog.c ('k') | third_party/grpc/src/core/census/placeholders.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698