0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

ircd::ctx: Improve/conform some watchdog log messages.

This commit is contained in:
Jason Volk 2018-12-15 16:26:34 -08:00
parent e16eefb8fb
commit 7471bf54f4

View file

@ -104,7 +104,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
"ctx('%s' #%u): unhandled: %s", "ctx('%s' id:%u): unhandled: %s",
name, name,
id, id,
e.what() e.what()
@ -1224,7 +1224,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
"pool(%p) ctx(%p '%s' #%u): unhandled: %s", "pool(%p) ctx(%p '%s' id:%u): unhandled: %s",
this, this,
current, current,
ircd::ctx::name(cur()), ircd::ctx::name(cur()),
@ -1401,11 +1401,12 @@ ircd::ctx::prof::check_slice()
if(unlikely(slice_warning > 0 && last_cycles >= slice_warning && !slice_exempt)) if(unlikely(slice_warning > 0 && last_cycles >= slice_warning && !slice_exempt))
log::dwarning log::dwarning
{ {
"context '%s' #%lu watchdog: timeslice excessive; lim:%lu last:%lu", "context '%s' id:%lu watchdog: timeslice excessive; lim:%lu last:%lu pct:%.2lf",
name(c), name(c),
id(c), id(c),
slice_warning, slice_warning,
last_cycles last_cycles,
((double(last_cycles) / double(slice_warning)) * 100.0)
}; };
const ulong &slice_assertion(settings::slice_assertion); const ulong &slice_assertion(settings::slice_assertion);
@ -1415,7 +1416,7 @@ ircd::ctx::prof::check_slice()
if(unlikely(slice_interrupt > 0 && last_cycles >= slice_interrupt && !slice_exempt)) if(unlikely(slice_interrupt > 0 && last_cycles >= slice_interrupt && !slice_exempt))
throw interrupted throw interrupted
{ {
"context '%s' #%lu watchdog interrupt; lim:%lu last:%lu total:%lu", "context '%s' id:%lu watchdog interrupt; lim:%lu last:%lu total:%lu",
name(c), name(c),
id(c), id(c),
slice_interrupt, slice_interrupt,
@ -1442,7 +1443,7 @@ ircd::ctx::prof::check_stack()
{ {
log::dwarning log::dwarning
{ {
"context '%s' #%lu watchdog: stack used %zu of %zu bytes", "context '%s' id:%lu watchdog: stack used %zu of %zu bytes",
name(c), name(c),
id(c), id(c),
stack_at, stack_at,