Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: CVS commit: src/sys/kern



Robert Elz writes:
>     Date:        Fri, 13 Apr 2018 05:21:16 -0400
>     From:        "Christos Zoulas" <christos%netbsd.org@localhost>
>     Message-ID:  <20180413092116.B3B08FBEC%cvs.NetBSD.org@localhost>
> 
>   | 	src/sys/kern: subr_prf.c
> 
>   | make this narrower by popular request.
> 
> Would it perhaps be reasonable to just print microseconds (or even
> 10's or 100's of microseconds) instead of nanoseconds ?
> 
> 	n = snprintf(buf, sizeof(buf), "[% 5jd.%.6ld] ",
> 	    (intmax_t)ts.tv_sec, ts.tv_nsec / 1000);
> 
> (or .5d and 10000 or .4d and 100000).   And perhaps really
> 4jd instead of 5jd - once it is well past dmesg.boot range, it
> doesn't matter nearly so much if occasionally the times don't
> line up - from 4 -> 5 digits is 2:45 approx, from 5->6 is over a
> day, and 11 1/2 days to switch to 7 digits.

in my day job we've been requested to add nanosecond as there
are too many times the same microsecond has many logs.  modern
CPUs can get a lot done in 1us.  i'd recommend going for at
least 100ns intervals, if not 10ns.

we could also make this only relevant on ports with cpus that
have faster cpus, leaving older systems with smaller logs.
(the seconds part shouldn't change, i think, as there is no
reason to believe any port has longer uptime than another.)

thanks.


.mrg.


Home | Main Index | Thread Index | Old Index