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
a90846ba
Commit
a90846ba
authored
Mar 09, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a "panic" method to stevedores, so they can dump the objcores
internal state.
parent
b469b6e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
cache_panic.c
bin/varnishd/cache/cache_panic.c
+7
-0
storage.h
bin/varnishd/storage/storage.h
+3
-0
No files found.
bin/varnishd/cache/cache_panic.c
View file @
a90846ba
...
...
@@ -258,6 +258,13 @@ pan_objcore(struct vsb *vsb, const char *typ, const struct objcore *oc)
if
(
strlen
(
oc
->
stobj
->
stevedore
->
ident
))
VSB_printf
(
vsb
,
" %s"
,
oc
->
stobj
->
stevedore
->
ident
);
VSB_printf
(
vsb
,
")"
);
if
(
oc
->
stobj
->
stevedore
->
panic
)
{
VSB_printf
(
vsb
,
" {
\n
"
);
VSB_indent
(
vsb
,
2
);
oc
->
stobj
->
stevedore
->
panic
(
vsb
,
oc
);
VSB_indent
(
vsb
,
-
2
);
VSB_printf
(
vsb
,
"}"
);
}
}
VSB_printf
(
vsb
,
",
\n
"
);
VSB_indent
(
vsb
,
-
2
);
...
...
bin/varnishd/storage/storage.h
View file @
a90846ba
...
...
@@ -71,6 +71,8 @@ typedef int storage_baninfo_f(const struct stevedore *, enum baninfo event,
const
uint8_t
*
ban
,
unsigned
len
);
typedef
void
storage_banexport_f
(
const
struct
stevedore
*
,
const
uint8_t
*
bans
,
unsigned
len
);
typedef
void
storage_panic_f
(
struct
vsb
*
vsb
,
const
struct
objcore
*
oc
);
typedef
struct
object
*
sml_getobj_f
(
struct
worker
*
,
struct
objcore
*
);
typedef
struct
storage
*
sml_alloc_f
(
const
struct
stevedore
*
,
size_t
size
);
...
...
@@ -97,6 +99,7 @@ struct stevedore {
storage_allocobj_f
*
allocobj
;
storage_baninfo_f
*
baninfo
;
storage_banexport_f
*
banexport
;
storage_panic_f
*
panic
;
/* Only if SML is used */
sml_alloc_f
*
sml_alloc
;
...
...
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