mirror of
https://github.com/matrix-construct/construct
synced 2024-10-01 13:18:58 +02:00
ircd::ctx: Improve/conform some watchdog log messages.
This commit is contained in:
parent
e16eefb8fb
commit
7471bf54f4
1 changed files with 7 additions and 6 deletions
13
ircd/ctx.cc
13
ircd/ctx.cc
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue