aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/buffer_list.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-11-16 15:27:13 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-11-16 18:11:42 -0800
commitbab043e8650799b91a4e40853e56439c2ddb15a7 (patch)
tree0b312ab9355dcc206e136a929fd6b58035b8d1d4 /src/core/lib/iomgr/buffer_list.cc
parentfc332d2c9247832af90792a59ff6d391e84bc8ae (diff)
Cleanup
Diffstat (limited to 'src/core/lib/iomgr/buffer_list.cc')
-rw-r--r--src/core/lib/iomgr/buffer_list.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc
index d7884a5965..e20dab15b1 100644
--- a/src/core/lib/iomgr/buffer_list.cc
+++ b/src/core/lib/iomgr/buffer_list.cc
@@ -31,7 +31,6 @@
namespace grpc_core {
void TracedBuffer::AddNewEntry(TracedBuffer** head, uint32_t seq_no,
void* arg) {
- gpr_log(GPR_INFO, "new entry %u", seq_no);
GPR_DEBUG_ASSERT(head != nullptr);
TracedBuffer* new_elem = New<TracedBuffer>(seq_no, arg);
/* Store the current time as the sendmsg time. */
@@ -56,16 +55,21 @@ void fill_gpr_from_timestamp(gpr_timespec* gts, const struct timespec* ts) {
gts->clock_type = GPR_CLOCK_REALTIME;
}
+void default_timestamps_callback(void* arg, grpc_core::Timestamps* ts,
+ grpc_error* shudown_err) {
+ gpr_log(GPR_DEBUG, "Timestamps callback has not been registered");
+}
+
/** The saved callback function that will be invoked when we get all the
* timestamps that we are going to get for a TracedBuffer. */
void (*timestamps_callback)(void*, grpc_core::Timestamps*,
- grpc_error* shutdown_err);
+ grpc_error* shutdown_err) =
+ default_timestamps_callback;
} /* namespace */
void TracedBuffer::ProcessTimestamp(TracedBuffer** head,
struct sock_extended_err* serr,
struct scm_timestamping* tss) {
- gpr_log(GPR_INFO, "process timestamp %u", serr->ee_data);
GPR_DEBUG_ASSERT(head != nullptr);
TracedBuffer* elem = *head;
TracedBuffer* next = nullptr;
@@ -87,7 +91,6 @@ void TracedBuffer::ProcessTimestamp(TracedBuffer** head,
/* Got all timestamps. Do the callback and free this TracedBuffer.
* The thing below can be passed by value if we don't want the
* restriction on the lifetime. */
- gpr_log(GPR_INFO, "calling");
timestamps_callback(elem->arg_, &(elem->ts_), GRPC_ERROR_NONE);
next = elem->next_;
Delete<TracedBuffer>(elem);
@@ -106,10 +109,8 @@ void TracedBuffer::Shutdown(TracedBuffer** head, void* remaining,
grpc_error* shutdown_err) {
GPR_DEBUG_ASSERT(head != nullptr);
TracedBuffer* elem = *head;
- gpr_log(GPR_INFO, "shutdown");
while (elem != nullptr) {
timestamps_callback(elem->arg_, &(elem->ts_), shutdown_err);
- gpr_log(GPR_INFO, "iter");
auto* next = elem->next_;
Delete<TracedBuffer>(elem);
elem = next;