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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
797d8dbf
Commit
797d8dbf
authored
Aug 29, 2016
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
cleanup,debug
parent
419c9d7a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/ext/transport/chttp2/transport/chttp2_transport.c
+8
-0
8 additions, 0 deletions
src/core/ext/transport/chttp2/transport/chttp2_transport.c
src/core/ext/transport/chttp2/transport/writing.c
+16
-4
16 additions, 4 deletions
src/core/ext/transport/chttp2/transport/writing.c
with
24 additions
and
4 deletions
src/core/ext/transport/chttp2/transport/chttp2_transport.c
+
8
−
0
View file @
797d8dbf
...
@@ -720,6 +720,8 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx,
...
@@ -720,6 +720,8 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx,
#define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16)
#define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16)
static
grpc_closure
*
add_closure_barrier
(
grpc_closure
*
closure
)
{
static
grpc_closure
*
add_closure_barrier
(
grpc_closure
*
closure
)
{
gpr_log
(
GPR_DEBUG
,
"add_closure_barrier[%p]: scratch=%"
PRIdPTR
,
closure
,
closure
->
next_data
.
scratch
);
closure
->
next_data
.
scratch
+=
CLOSURE_BARRIER_FIRST_REF_BIT
;
closure
->
next_data
.
scratch
+=
CLOSURE_BARRIER_FIRST_REF_BIT
;
return
closure
;
return
closure
;
}
}
...
@@ -734,6 +736,8 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx,
...
@@ -734,6 +736,8 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_UNREF
(
error
);
GRPC_ERROR_UNREF
(
error
);
return
;
return
;
}
}
gpr_log
(
GPR_DEBUG
,
"complete_closure_step[%p]: scratch=%"
PRIdPTR
,
closure
,
closure
->
next_data
.
scratch
);
closure
->
next_data
.
scratch
-=
CLOSURE_BARRIER_FIRST_REF_BIT
;
closure
->
next_data
.
scratch
-=
CLOSURE_BARRIER_FIRST_REF_BIT
;
if
(
error
!=
GRPC_ERROR_NONE
)
{
if
(
error
!=
GRPC_ERROR_NONE
)
{
if
(
closure
->
error
==
GRPC_ERROR_NONE
)
{
if
(
closure
->
error
==
GRPC_ERROR_NONE
)
{
...
@@ -772,6 +776,10 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx,
...
@@ -772,6 +776,10 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx,
static
void
continue_fetching_send_locked
(
grpc_exec_ctx
*
exec_ctx
,
static
void
continue_fetching_send_locked
(
grpc_exec_ctx
*
exec_ctx
,
grpc_chttp2_transport
*
t
,
grpc_chttp2_transport
*
t
,
grpc_chttp2_stream
*
s
)
{
grpc_chttp2_stream
*
s
)
{
gpr_log
(
GPR_DEBUG
,
"continue_fetching_send_locked[%d]: fsm=%p fetched=%d tgt=%d"
,
s
->
id
,
s
->
fetching_send_message
,
s
->
fetched_send_message_length
,
s
->
fetching_send_message
->
length
);
if
(
s
->
fetching_send_message
==
NULL
)
{
if
(
s
->
fetching_send_message
==
NULL
)
{
/* Stream was cancelled before message fetch completed */
/* Stream was cancelled before message fetch completed */
abort
();
/* TODO(ctiller): what cleanup here? */
abort
();
/* TODO(ctiller): what cleanup here? */
...
...
This diff is collapsed.
Click to expand it.
src/core/ext/transport/chttp2/transport/writing.c
+
16
−
4
View file @
797d8dbf
...
@@ -77,6 +77,13 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
...
@@ -77,6 +77,13 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
GPR_TIMER_BEGIN
(
"grpc_chttp2_begin_write"
,
0
);
GPR_TIMER_BEGIN
(
"grpc_chttp2_begin_write"
,
0
);
gpr_log
(
GPR_DEBUG
,
"grpc_chttp2_begin_write: outbuf_len0=%"
PRIdPTR
" dirtied_local_settings=%d sent_local_settings=%d qbuf_len=%"
PRIdPTR
,
t
->
outbuf
.
length
,
t
->
dirtied_local_settings
,
t
->
sent_local_settings
,
t
->
qbuf
.
length
);
if
(
t
->
dirtied_local_settings
&&
!
t
->
sent_local_settings
)
{
if
(
t
->
dirtied_local_settings
&&
!
t
->
sent_local_settings
)
{
gpr_slice_buffer_add
(
gpr_slice_buffer_add
(
&
t
->
outbuf
,
&
t
->
outbuf
,
...
@@ -109,8 +116,13 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
...
@@ -109,8 +116,13 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
bool
sent_initial_metadata
=
s
->
sent_initial_metadata
;
bool
sent_initial_metadata
=
s
->
sent_initial_metadata
;
bool
now_writing
=
false
;
bool
now_writing
=
false
;
GRPC_CHTTP2_FLOW_MOVE_STREAM
(
"write"
,
t
,
s
,
outgoing_window
,
s
,
gpr_log
(
GPR_DEBUG
,
outgoing_window
);
"grpc_chttp2_begin_write[%d]: sent_initial_metadata=%d "
"send_initial_metadata=%p announce_window=%d fcbuf_len=%"
PRIdPTR
" s_win=%"
PRId64
" t_win=%"
PRId64
" send_trailing_metadata=%p"
,
s
->
id
,
sent_initial_metadata
,
s
->
send_initial_metadata
,
s
->
announce_window
,
s
->
flow_controlled_buffer
.
length
,
s
->
outgoing_window
,
t
->
outgoing_window
,
s
->
send_trailing_metadata
);
/* send initial metadata if it's available */
/* send initial metadata if it's available */
if
(
!
sent_initial_metadata
&&
s
->
send_initial_metadata
)
{
if
(
!
sent_initial_metadata
&&
s
->
send_initial_metadata
)
{
...
@@ -123,7 +135,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
...
@@ -123,7 +135,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
now_writing
=
true
;
now_writing
=
true
;
}
}
/* send any window updates */
/* send any window updates */
if
(
s
->
announce_window
>
0
&&
s
->
sen
d
_initial_metadata
==
NULL
)
{
if
(
s
->
announce_window
>
0
&&
s
->
sen
t
_initial_metadata
)
{
uint32_t
announce
=
s
->
announce_window
;
uint32_t
announce
=
s
->
announce_window
;
gpr_slice_buffer_add
(
&
t
->
outbuf
,
gpr_slice_buffer_add
(
&
t
->
outbuf
,
grpc_chttp2_window_update_create
(
grpc_chttp2_window_update_create
(
...
@@ -156,7 +168,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
...
@@ -156,7 +168,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx,
send_bytes
);
send_bytes
);
if
(
is_last_frame
)
{
if
(
is_last_frame
)
{
s
->
send_trailing_metadata
=
NULL
;
s
->
send_trailing_metadata
=
NULL
;
s
->
sent_trailing_metadata
=
1
;
s
->
sent_trailing_metadata
=
true
;
}
}
s
->
sending_bytes
+=
send_bytes
;
s
->
sending_bytes
+=
send_bytes
;
now_writing
=
true
;
now_writing
=
true
;
...
...
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
sign in
to comment