Added missing profiling tags.

pull/1469/head
David Garcia Quintas 10 years ago
parent 925573c17f
commit f667f1b3e8
  1. 4
      src/core/iomgr/tcp_posix.c
  2. 5
      src/core/profiling/timers.h
  3. 4
      src/core/surface/call.c
  4. 6
      src/core/transport/chttp2_transport.c

@ -343,11 +343,11 @@ static void grpc_tcp_continue_read(grpc_tcp *tcp) {
msg.msg_controllen = 0; msg.msg_controllen = 0;
msg.msg_flags = 0; msg.msg_flags = 0;
GRPC_TIMER_MARK(RECVMSG_BEGIN, 0); GRPC_TIMER_BEGIN(GRPC_PTAG_RECVMSG, 0);
do { do {
read_bytes = recvmsg(tcp->fd, &msg, 0); read_bytes = recvmsg(tcp->fd, &msg, 0);
} while (read_bytes < 0 && errno == EINTR); } while (read_bytes < 0 && errno == EINTR);
GRPC_TIMER_MARK(RECVMSG_END, 0); GRPC_TIMER_END(GRPC_PTAG_RECVMSG, 0);
if (read_bytes < allocated_bytes) { if (read_bytes < allocated_bytes) {
/* TODO(klempner): Consider a second read first, in hopes of getting a /* TODO(klempner): Consider a second read first, in hopes of getting a

@ -60,11 +60,16 @@ enum grpc_profiling_tags {
GRPC_PTAG_POLL_FINISHED = 203 + GRPC_PTAG_IGNORE_THRESHOLD, GRPC_PTAG_POLL_FINISHED = 203 + GRPC_PTAG_IGNORE_THRESHOLD,
GRPC_PTAG_TCP_CB_WRITE = 204 + GRPC_PTAG_IGNORE_THRESHOLD, GRPC_PTAG_TCP_CB_WRITE = 204 + GRPC_PTAG_IGNORE_THRESHOLD,
GRPC_PTAG_TCP_WRITE = 205 + GRPC_PTAG_IGNORE_THRESHOLD, GRPC_PTAG_TCP_WRITE = 205 + GRPC_PTAG_IGNORE_THRESHOLD,
GRPC_PTAG_CALL_ON_DONE_RECV = 206 + GRPC_PTAG_IGNORE_THRESHOLD,
/* C++ */ /* C++ */
GRPC_PTAG_CPP_CALL_CREATED = 300 + GRPC_PTAG_IGNORE_THRESHOLD, GRPC_PTAG_CPP_CALL_CREATED = 300 + GRPC_PTAG_IGNORE_THRESHOLD,
GRPC_PTAG_CPP_PERFORM_OPS = 301 + GRPC_PTAG_IGNORE_THRESHOLD, GRPC_PTAG_CPP_PERFORM_OPS = 301 + GRPC_PTAG_IGNORE_THRESHOLD,
/* Transports */
GRPC_PTAG_HTTP2_UNLOCK = 401 + GRPC_PTAG_IGNORE_THRESHOLD,
GRPC_PTAG_HTTP2_UNLOCK_CLEANUP = 402 + GRPC_PTAG_IGNORE_THRESHOLD,
/* > 1024 Unassigned reserved. For any miscellaneous use. /* > 1024 Unassigned reserved. For any miscellaneous use.
* Use addition to generate tags from this base or take advantage of the 10 * Use addition to generate tags from this base or take advantage of the 10
* zero'd bits for OR-ing. */ * zero'd bits for OR-ing. */

@ -686,7 +686,7 @@ static int add_slice_to_message(grpc_call *call, gpr_slice slice) {
static void call_on_done_recv(void *pc, int success) { static void call_on_done_recv(void *pc, int success) {
grpc_call *call = pc; grpc_call *call = pc;
size_t i; size_t i;
GRPC_TIMER_MARK(CALL_ON_DONE_RECV_BEGIN, 0); GRPC_TIMER_BEGIN(GRPC_PTAG_CALL_ON_DONE_RECV, 0);
lock(call); lock(call);
call->receiving = 0; call->receiving = 0;
if (success) { if (success) {
@ -731,7 +731,7 @@ static void call_on_done_recv(void *pc, int success) {
unlock(call); unlock(call);
GRPC_CALL_INTERNAL_UNREF(call, "receiving", 0); GRPC_CALL_INTERNAL_UNREF(call, "receiving", 0);
GRPC_TIMER_MARK(CALL_ON_DONE_RECV_END, 0); GRPC_TIMER_BEGIN(GRPC_PTAG_CALL_ON_DONE_RECV, 0);
} }
static grpc_mdelem_list chain_metadata_from_app(grpc_call *call, size_t count, static grpc_mdelem_list chain_metadata_from_app(grpc_call *call, size_t count,

@ -799,7 +799,7 @@ static void unlock(transport *t) {
grpc_stream_op_buffer nuke_now; grpc_stream_op_buffer nuke_now;
const grpc_transport_callbacks *cb = t->cb; const grpc_transport_callbacks *cb = t->cb;
GRPC_TIMER_MARK(HTTP2_UNLOCK_BEGIN, 0); GRPC_TIMER_BEGIN(GRPC_PTAG_HTTP2_UNLOCK, 0);
grpc_sopb_init(&nuke_now); grpc_sopb_init(&nuke_now);
if (t->nuke_later_sopb.nops) { if (t->nuke_later_sopb.nops) {
@ -849,7 +849,7 @@ static void unlock(transport *t) {
/* finally unlock */ /* finally unlock */
gpr_mu_unlock(&t->mu); gpr_mu_unlock(&t->mu);
GRPC_TIMER_MARK(HTTP2_UNLOCK_CLEANUP, 0); GRPC_TIMER_MARK(GRPC_PTAG_HTTP2_UNLOCK_CLEANUP, 0);
/* perform some callbacks if necessary */ /* perform some callbacks if necessary */
for (i = 0; i < num_goaways; i++) { for (i = 0; i < num_goaways; i++) {
@ -882,7 +882,7 @@ static void unlock(transport *t) {
gpr_free(goaways); gpr_free(goaways);
GRPC_TIMER_MARK(HTTP2_UNLOCK_END, 0); GRPC_TIMER_END(GRPC_PTAG_HTTP2_UNLOCK, 0);
} }
/* /*

Loading…
Cancel
Save