0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

ircd::ctx::prof: Consistent warning message strings.

This commit is contained in:
Jason Volk 2018-02-05 19:12:34 -08:00
parent af62b5f089
commit 230eb3fc7a

View file

@ -889,7 +889,7 @@ ircd::ctx::prof::check_slice()
{ {
log::warning log::warning
{ {
"context timeslice exceeded '%s' (%lu) total: %06ld$us last: %lu$ns %lu$tsc", "context timeslice exceeded '%s' #%lu total: %06ld$us last: %lu$ns %lu$tsc",
name(c), name(c),
id(c), id(c),
c.awake.count(), c.awake.count(),
@ -903,7 +903,7 @@ ircd::ctx::prof::check_slice()
if(unlikely(settings.slice_interrupt > 0us && time_usage >= settings.slice_interrupt)) if(unlikely(settings.slice_interrupt > 0us && time_usage >= settings.slice_interrupt))
throw interrupted throw interrupted
{ {
"Time slice exceeded '%s' (%lu) (last: %06ld microseconds)", "Time slice exceeded '%s' #%lu (last: %06ld microseconds)",
name(c), name(c),
id(c), id(c),
duration_cast<microseconds>(time_usage).count() duration_cast<microseconds>(time_usage).count()
@ -919,10 +919,14 @@ ircd::ctx::prof::check_stack()
if(unlikely(stack_usage > stack_max * settings.stack_usage_warning)) if(unlikely(stack_usage > stack_max * settings.stack_usage_warning))
{ {
log::warning("context stack usage ctx(%p) used %zu of %zu bytes", log::warning
(const void *)&c, {
stack_usage, "context stack usage ctx '%s' #%lu used %zu of %zu bytes",
c.stack_max); name(c),
id(c),
stack_usage,
c.stack_max
};
assert(stack_usage < c.stack_max * settings.stack_usage_assertion); assert(stack_usage < c.stack_max * settings.stack_usage_assertion);
} }