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
aaf39abb
Commit
aaf39abb
authored
9 years ago
by
Nicolas "Pixel" Noble
Browse files
Options
Downloads
Patches
Plain Diff
Adding file and line number to cq debug refcount.
parent
66daf234
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/surface/completion_queue.c
+10
-6
10 additions, 6 deletions
src/core/surface/completion_queue.c
src/core/surface/completion_queue.h
+8
-4
8 additions, 4 deletions
src/core/surface/completion_queue.h
with
18 additions
and
10 deletions
src/core/surface/completion_queue.c
+
10
−
6
View file @
aaf39abb
...
@@ -88,9 +88,11 @@ grpc_completion_queue *grpc_completion_queue_create(void) {
...
@@ -88,9 +88,11 @@ grpc_completion_queue *grpc_completion_queue_create(void) {
}
}
#ifdef GRPC_CQ_REF_COUNT_DEBUG
#ifdef GRPC_CQ_REF_COUNT_DEBUG
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
)
{
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
,
gpr_log
(
GPR_DEBUG
,
"CQ:%p ref %d -> %d %s"
,
cc
,
(
int
)
cc
->
owning_refs
.
count
,
const
char
*
file
,
int
line
)
{
(
int
)
cc
->
owning_refs
.
count
+
1
,
reason
);
gpr_log
(
file
,
line
,
GPR_LOG_SEVERITY_DEBUG
,
"CQ:%p ref %d -> %d %s"
,
cc
,
(
int
)
cc
->
owning_refs
.
count
,
(
int
)
cc
->
owning_refs
.
count
+
1
,
reason
);
#else
#else
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
)
{
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
)
{
#endif
#endif
...
@@ -103,9 +105,11 @@ static void on_pollset_destroy_done(void *arg) {
...
@@ -103,9 +105,11 @@ static void on_pollset_destroy_done(void *arg) {
}
}
#ifdef GRPC_CQ_REF_COUNT_DEBUG
#ifdef GRPC_CQ_REF_COUNT_DEBUG
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
)
{
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
,
gpr_log
(
GPR_DEBUG
,
"CQ:%p unref %d -> %d %s"
,
cc
,
(
int
)
cc
->
owning_refs
.
count
,
const
char
*
file
,
int
line
)
{
(
int
)
cc
->
owning_refs
.
count
-
1
,
reason
);
gpr_log
(
file
,
line
,
GPR_LOG_SEVERITY_DEBUG
,
"CQ:%p unref %d -> %d %s"
,
cc
,
(
int
)
cc
->
owning_refs
.
count
,
(
int
)
cc
->
owning_refs
.
count
-
1
,
reason
);
#else
#else
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
)
{
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
)
{
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/core/surface/completion_queue.h
+
8
−
4
View file @
aaf39abb
...
@@ -40,10 +40,14 @@
...
@@ -40,10 +40,14 @@
#include
<grpc/grpc.h>
#include
<grpc/grpc.h>
#ifdef GRPC_CQ_REF_COUNT_DEBUG
#ifdef GRPC_CQ_REF_COUNT_DEBUG
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
);
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
,
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
);
const
char
*
file
,
int
line
);
#define GRPC_CQ_INTERNAL_REF(cc, reason) grpc_cq_internal_ref(cc, reason)
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
,
const
char
*
reason
,
#define GRPC_CQ_INTERNAL_UNREF(cc, reason) grpc_cq_internal_unref(cc, reason)
const
char
*
file
,
int
line
);
#define GRPC_CQ_INTERNAL_REF(cc, reason) \
grpc_cq_internal_ref(cc, reason, __FILE__, __LINE__)
#define GRPC_CQ_INTERNAL_UNREF(cc, reason) \
grpc_cq_internal_unref(cc, reason, __FILE__, __LINE__)
#else
#else
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
);
void
grpc_cq_internal_ref
(
grpc_completion_queue
*
cc
);
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
);
void
grpc_cq_internal_unref
(
grpc_completion_queue
*
cc
);
...
...
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