Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
4dbf7e7f
Commit
4dbf7e7f
authored
Aug 27, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move 3 bits more from diag_bitmaps to debug
XXX: doc-update needed
parent
73632b2c
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
23 deletions
+23
-23
cache.h
bin/varnishd/cache/cache.h
+3
-3
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-1
cache_hash.c
bin/varnishd/cache/cache_hash.c
+2
-2
cache_ws.c
bin/varnishd/cache/cache_ws.c
+8
-8
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+0
-3
cache_waiter_kqueue.c
bin/varnishd/waiter/cache_waiter_kqueue.c
+2
-2
b00000.vtc
bin/varnishtest/tests/b00000.vtc
+1
-1
r00345.vtc
bin/varnishtest/tests/r00345.vtc
+1
-1
r00386.vtc
bin/varnishtest/tests/r00386.vtc
+1
-1
debug_bits.h
include/tbl/debug_bits.h
+4
-1
No files found.
bin/varnishd/cache/cache.h
View file @
4dbf7e7f
...
...
@@ -1124,8 +1124,8 @@ DO_DEBUG(enum debug_bits x)
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
#define DSL(
flag, tag
, id, ...) \
#define DSL(
debug_bit
, id, ...) \
do { \
if (
cache_param->diag_bitmap & (flag))
\
VSL(
(tag), (id), __VA_ARGS__);
\
if (
DO_DEBUG(debug_bit))
\
VSL(
SLT_Debug, (id), __VA_ARGS__);
\
} while (0)
bin/varnishd/cache/cache_esi_deliver.c
View file @
4dbf7e7f
...
...
@@ -105,7 +105,7 @@ ved_include(struct req *preq, const char *src, const char *host)
i
=
CNT_Request
(
wrk
,
req
);
if
(
i
==
1
)
break
;
DSL
(
0x20
,
SLT_Debug
,
req
->
vsl
->
wid
,
DSL
(
DBG_WAITINGLIST
,
req
->
vsl
->
wid
,
"loop waiting for ESI (%d)"
,
i
);
assert
(
i
==
2
);
AZ
(
req
->
wrk
);
...
...
bin/varnishd/cache/cache_hash.c
View file @
4dbf7e7f
...
...
@@ -420,7 +420,7 @@ HSH_Lookup(struct req *req)
VTAILQ_INSERT_TAIL
(
&
oh
->
waitinglist
->
list
,
req
,
w_list
);
}
if
(
cache_param
->
diag_bitmap
&
0x20
)
if
(
DO_DEBUG
(
DBG_WAITINGLIST
)
)
VSLb
(
req
->
vsl
,
SLT_Debug
,
"on waiting list <%p>"
,
oh
);
...
...
@@ -483,7 +483,7 @@ hsh_rush(struct dstat *ds, struct objhead *oh)
ds
->
busy_wakeup
++
;
AZ
(
req
->
wrk
);
VTAILQ_REMOVE
(
&
wl
->
list
,
req
,
w_list
);
DSL
(
0x20
,
SLT_Debug
,
req
->
vsl
->
wid
,
"off waiting list"
);
DSL
(
DBG_WAITINGLIST
,
req
->
vsl
->
wid
,
"off waiting list"
);
if
(
SES_ScheduleReq
(
req
))
{
/*
* We could not schedule the session, leave the
...
...
bin/varnishd/cache/cache_ws.c
View file @
4dbf7e7f
...
...
@@ -37,7 +37,7 @@ WS_Assert(const struct ws *ws)
{
CHECK_OBJ_NOTNULL
(
ws
,
WS_MAGIC
);
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS(%p = (%s, %p %u %u %u)"
,
DSL
(
DBG_WORKSPACE
,
0
,
"WS(%p = (%s, %p %u %u %u)"
,
ws
,
ws
->
id
,
ws
->
s
,
pdiff
(
ws
->
s
,
ws
->
f
),
ws
->
r
==
NULL
?
0
:
pdiff
(
ws
->
f
,
ws
->
r
),
pdiff
(
ws
->
s
,
ws
->
e
));
...
...
@@ -60,7 +60,7 @@ void
WS_Init
(
struct
ws
*
ws
,
const
char
*
id
,
void
*
space
,
unsigned
len
)
{
DSL
(
0x02
,
SLT_Debug
,
0
,
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Init(%p,
\"
%s
\"
, %p, %u)"
,
ws
,
id
,
space
,
len
);
assert
(
space
!=
NULL
);
memset
(
ws
,
0
,
sizeof
*
ws
);
...
...
@@ -83,7 +83,7 @@ WS_Reset(struct ws *ws, char *p)
{
WS_Assert
(
ws
);
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_Reset(%p, %p)"
,
ws
,
p
);
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Reset(%p, %p)"
,
ws
,
p
);
assert
(
ws
->
r
==
NULL
);
if
(
p
==
NULL
)
ws
->
f
=
ws
->
s
;
...
...
@@ -111,7 +111,7 @@ WS_Alloc(struct ws *ws, unsigned bytes)
}
r
=
ws
->
f
;
ws
->
f
+=
bytes
;
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_Alloc(%p, %u) = %p"
,
ws
,
bytes
,
r
);
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Alloc(%p, %u) = %p"
,
ws
,
bytes
,
r
);
WS_Assert
(
ws
);
return
(
r
);
}
...
...
@@ -122,7 +122,7 @@ WS_Snapshot(struct ws *ws)
WS_Assert
(
ws
);
assert
(
ws
->
r
==
NULL
);
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_Snapshot(%p) = %p"
,
ws
,
ws
->
f
);
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Snapshot(%p) = %p"
,
ws
,
ws
->
f
);
return
(
ws
->
f
);
}
...
...
@@ -142,7 +142,7 @@ WS_Reserve(struct ws *ws, unsigned bytes)
b2
=
PRNDDN
(
b2
);
xxxassert
(
ws
->
f
+
b2
<=
ws
->
e
);
ws
->
r
=
ws
->
f
+
b2
;
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_Reserve(%p, %u/%u) = %u"
,
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Reserve(%p, %u/%u) = %u"
,
ws
,
b2
,
bytes
,
pdiff
(
ws
->
f
,
ws
->
r
));
WS_Assert
(
ws
);
return
(
pdiff
(
ws
->
f
,
ws
->
r
));
...
...
@@ -154,7 +154,7 @@ WS_Release(struct ws *ws, unsigned bytes)
WS_Assert
(
ws
);
bytes
=
PRNDUP
(
bytes
);
assert
(
bytes
<=
ws
->
e
-
ws
->
f
);
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_Release(%p, %u)"
,
ws
,
bytes
);
DSL
(
DBG_WORKSPACE
,
0
,
"WS_Release(%p, %u)"
,
ws
,
bytes
);
assert
(
ws
->
r
!=
NULL
);
assert
(
ws
->
f
+
bytes
<=
ws
->
r
);
ws
->
f
+=
bytes
;
...
...
@@ -166,7 +166,7 @@ void
WS_ReleaseP
(
struct
ws
*
ws
,
char
*
ptr
)
{
WS_Assert
(
ws
);
DSL
(
0x02
,
SLT_Debug
,
0
,
"WS_ReleaseP(%p, %p)"
,
ws
,
ptr
);
DSL
(
DBG_WORKSPACE
,
0
,
"WS_ReleaseP(%p, %p)"
,
ws
,
ptr
);
assert
(
ws
->
r
!=
NULL
);
assert
(
ptr
>=
ws
->
f
);
assert
(
ptr
<=
ws
->
r
);
...
...
bin/varnishd/mgt/mgt_param.c
View file @
4dbf7e7f
...
...
@@ -1046,11 +1046,8 @@ static const struct parspec input_parspec[] = {
WAITER_DEFAULT
,
NULL
},
{
"diag_bitmap"
,
tweak_diag_bitmap
,
0
,
0
,
0
,
"Bitmap controlling diagnostics code:
\n
"
" 0x00000002 - workspace debugging.
\n
"
" 0x00000004 - kqueue debugging.
\n
"
" 0x00000008 - mutex logging.
\n
"
" 0x00000010 - mutex contests.
\n
"
" 0x00000020 - waiting list.
\n
"
" 0x00000040 - object workspace.
\n
"
" 0x00000080 - mutex timing.
\n
"
" 0x00001000 - do not core-dump child process.
\n
"
...
...
bin/varnishd/waiter/cache_waiter_kqueue.c
View file @
4dbf7e7f
...
...
@@ -80,7 +80,7 @@ vwk_kq_sess(struct vwk *vwk, struct sess *sp, short arm)
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
assert
(
sp
->
fd
>=
0
);
DSL
(
0x04
,
SLT_Debug
,
sp
->
vxid
,
"KQ: EV_SET sp %p arm %x"
,
sp
,
arm
);
DSL
(
DBG_WAITER
,
sp
->
vxid
,
"KQ: EV_SET sp %p arm %x"
,
sp
,
arm
);
EV_SET
(
&
vwk
->
ki
[
vwk
->
nki
],
sp
->
fd
,
EVFILT_READ
,
arm
,
0
,
0
,
sp
);
if
(
++
vwk
->
nki
==
NKEV
)
vwk_kq_flush
(
vwk
);
...
...
@@ -121,7 +121,7 @@ vwk_sess_ev(struct vwk *vwk, const struct kevent *kp, double now)
AN
(
kp
->
udata
);
assert
(
kp
->
udata
!=
vwk
->
pipes
);
CAST_OBJ_NOTNULL
(
sp
,
kp
->
udata
,
SESS_MAGIC
);
DSL
(
0x04
,
SLT_Debug
,
sp
->
vxid
,
"KQ: sp %p kev data %lu flags 0x%x%s"
,
DSL
(
DBG_WAITER
,
sp
->
vxid
,
"KQ: sp %p kev data %lu flags 0x%x%s"
,
sp
,
(
unsigned
long
)
kp
->
data
,
kp
->
flags
,
(
kp
->
flags
&
EV_EOF
)
?
" EOF"
:
""
);
...
...
bin/varnishtest/tests/b00000.vtc
View file @
4dbf7e7f
...
...
@@ -7,7 +7,7 @@ server s1 {
varnish v1 -storage "-smalloc,1m" -vcl+backend {} -start
varnish v1 -cliok "param.set d
iag_bitmap 0x2
"
varnish v1 -cliok "param.set d
ebug +workspace
"
varnish v1 -expect n_object == 0
varnish v1 -expect sess_conn == 0
...
...
bin/varnishtest/tests/r00345.vtc
View file @
4dbf7e7f
...
...
@@ -9,7 +9,7 @@ server s1 {
txresp -body {DATA}
} -start
varnish v1 -arg "-p d
iag_bitmap=0x20
" -vcl+backend {
varnish v1 -arg "-p d
ebug=+workspace
" -vcl+backend {
sub vcl_fetch {
if (req.url == "/") {
set beresp.do_esi = true;
...
...
bin/varnishtest/tests/r00386.vtc
View file @
4dbf7e7f
...
...
@@ -9,7 +9,7 @@ server s1 {
txresp -body {<X><esi:include src="/body"/></X>}
} -start
varnish v1 -arg "-p d
iag_bitmap=0x20
" -vcl+backend {
varnish v1 -arg "-p d
ebug=+workspace
" -vcl+backend {
sub vcl_fetch {
if (req.url == "/") {
set beresp.do_esi = true;
...
...
include/tbl/debug_bits.h
View file @
4dbf7e7f
...
...
@@ -29,4 +29,7 @@
*
*/
DEBUG_BIT
(
REQ_STATE
,
req_state
,
""
,
"Request state engine"
)
DEBUG_BIT
(
REQ_STATE
,
req_state
,
""
,
"VSL Request state engine"
)
DEBUG_BIT
(
WORKSPACE
,
workspace
,
""
,
"VSL Workspace operations"
)
DEBUG_BIT
(
WAITER
,
waiter
,
""
,
"VSL Waiter internals"
)
DEBUG_BIT
(
WAITINGLIST
,
waitinglist
,
""
,
"VSL Waitinglist events"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment