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
46863cff
Commit
46863cff
authored
10 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Make it possible to compile out tracing
parent
e23555a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/debug/trace.c
+5
-0
5 additions, 0 deletions
src/core/debug/trace.c
src/core/debug/trace.h
+9
-0
9 additions, 0 deletions
src/core/debug/trace.h
with
14 additions
and
0 deletions
src/core/debug/trace.c
+
5
−
0
View file @
46863cff
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include
<grpc/support/log.h>
#include
<grpc/support/log.h>
#include
"src/core/support/env.h"
#include
"src/core/support/env.h"
#if GRPC_ENABLE_TRACING
gpr_uint32
grpc_trace_bits
;
gpr_uint32
grpc_trace_bits
;
static
void
add
(
const
char
*
beg
,
const
char
*
end
,
char
***
ss
,
size_t
*
ns
)
{
static
void
add
(
const
char
*
beg
,
const
char
*
end
,
char
***
ss
,
size_t
*
ns
)
{
...
@@ -102,4 +103,8 @@ void grpc_init_trace_bits() {
...
@@ -102,4 +103,8 @@ void grpc_init_trace_bits() {
gpr_free
(
e
);
gpr_free
(
e
);
}
}
}
}
#else
void
grpc_init_trace_bits
()
{
}
#endif
This diff is collapsed.
Click to expand it.
src/core/debug/trace.h
+
9
−
0
View file @
46863cff
...
@@ -36,6 +36,11 @@
...
@@ -36,6 +36,11 @@
#include
<grpc/support/port_platform.h>
#include
<grpc/support/port_platform.h>
/* set to zero to remove all debug trace code */
#ifndef GRPC_ENABLE_TRACING
# define GRPC_ENABLE_TRACING 1
#endif
typedef
enum
{
typedef
enum
{
GRPC_TRACE_SURFACE
=
1
<<
0
,
GRPC_TRACE_SURFACE
=
1
<<
0
,
GRPC_TRACE_CHANNEL
=
1
<<
1
,
GRPC_TRACE_CHANNEL
=
1
<<
1
,
...
@@ -43,7 +48,11 @@ typedef enum {
...
@@ -43,7 +48,11 @@ typedef enum {
GRPC_TRACE_SECURE_ENDPOINT
=
1
<<
3
GRPC_TRACE_SECURE_ENDPOINT
=
1
<<
3
}
grpc_trace_bit_value
;
}
grpc_trace_bit_value
;
#if GRPC_ENABLE_TRACING
extern
gpr_uint32
grpc_trace_bits
;
extern
gpr_uint32
grpc_trace_bits
;
#else
# define grpc_trace_bits 0
#endif
void
grpc_init_trace_bits
();
void
grpc_init_trace_bits
();
...
...
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