Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c7308964
Commit
c7308964
authored
8 years ago
by
murgatroid99
Browse files
Options
Downloads
Patches
Plain Diff
Add tcp_client_uv tracing
parent
87b8195e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/lib/iomgr/tcp_client_uv.c
+14
-0
14 additions, 0 deletions
src/core/lib/iomgr/tcp_client_uv.c
with
14 additions
and
0 deletions
src/core/lib/iomgr/tcp_client_uv.c
+
14
−
0
View file @
c7308964
...
@@ -46,6 +46,8 @@
...
@@ -46,6 +46,8 @@
#include
"src/core/lib/iomgr/tcp_uv.h"
#include
"src/core/lib/iomgr/tcp_uv.h"
#include
"src/core/lib/iomgr/timer.h"
#include
"src/core/lib/iomgr/timer.h"
extern
int
grpc_tcp_trace
;
typedef
struct
grpc_uv_tcp_connect
{
typedef
struct
grpc_uv_tcp_connect
{
uv_connect_t
connect_req
;
uv_connect_t
connect_req
;
grpc_timer
alarm
;
grpc_timer
alarm
;
...
@@ -70,6 +72,12 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
...
@@ -70,6 +72,12 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
grpc_error
*
error
)
{
grpc_error
*
error
)
{
int
done
;
int
done
;
grpc_uv_tcp_connect
*
connect
=
acp
;
grpc_uv_tcp_connect
*
connect
=
acp
;
if
(
grpc_tcp_trace
)
{
const
char
*
str
=
grpc_error_string
(
error
);
gpr_log
(
GPR_DEBUG
,
"CLIENT_CONNECT: %s: on_alarm: error=%s"
,
connect
->
addr_name
,
str
);
grpc_error_free_string
(
str
);
}
if
(
error
==
GRPC_ERROR_NONE
)
{
if
(
error
==
GRPC_ERROR_NONE
)
{
/* error == NONE implies that the timer ran out, and wasn't cancelled. If
/* error == NONE implies that the timer ran out, and wasn't cancelled. If
it was cancelled, then the handler that cancelled it also should close
it was cancelled, then the handler that cancelled it also should close
...
@@ -145,6 +153,12 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
...
@@ -145,6 +153,12 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
connect
->
resource_quota
=
resource_quota
;
connect
->
resource_quota
=
resource_quota
;
uv_tcp_init
(
uv_default_loop
(),
connect
->
tcp_handle
);
uv_tcp_init
(
uv_default_loop
(),
connect
->
tcp_handle
);
connect
->
connect_req
.
data
=
connect
;
connect
->
connect_req
.
data
=
connect
;
if
(
grpc_tcp_trace
)
{
gpr_log
(
GPR_DEBUG
,
"CLIENT_CONNECT: %s: asynchronously connecting"
,
connect
->
addr_name
);
}
// TODO(murgatroid99): figure out what the return value here means
// TODO(murgatroid99): figure out what the return value here means
uv_tcp_connect
(
&
connect
->
connect_req
,
connect
->
tcp_handle
,
uv_tcp_connect
(
&
connect
->
connect_req
,
connect
->
tcp_handle
,
(
const
struct
sockaddr
*
)
resolved_addr
->
addr
,
(
const
struct
sockaddr
*
)
resolved_addr
->
addr
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment