On 01/17/18 15:09, Gleb Smirnoff wrote: > On Sun, Dec 31, 2017 at 09:21:01AM +0000, Colin Percival wrote: > C> Code for recording timestamps of events, especially function > entries/exits. > C> This is a very primitive system, intended for use in measuring > performance > C> during the early system boot, before more sophisticated tools like DTrace > C> or infrastructure like kernel memory allocation and mutexes are > available. > > Sorry if my question is too lame and late. Why can't you use ktr(4) tracer > for that purpose? The discussion on freebsd-current also doesn't have answer.
I considered it, but it wasn't a good fit for a couple reasons: 1. ktr uses a circular buffer, while (since I'm looking at the boot process) I want to fill a buffer and then stop recording. 2. I would have needed to hack up ktr in order to make it work early enough in the boot process. (Most obviously: When we enter hammer_time, trying to access 'curthread' is a Bad Idea.) Since the timestamp recording framework I needed was just a few lines of code -- all the other commits are to add the points where timestamps are recorded, and would have been needed even if I used ktr -- it seemed better to just add my own code rather than coercing ktr to do what I needed. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"