Date: Sun, 31 Dec 2017 09:22:07 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327425 - head/sys/amd64/amd64 Message-ID: <201712310922.vBV9M7Zd045507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Sun Dec 31 09:22:07 2017 New Revision: 327425 URL: https://svnweb.freebsd.org/changeset/base/327425 Log: Use the TSLOG framework to record entry/exit timestamps for hammer_time. The entry must be logged "manually" using TSRAW rather than TSENTER since PCPU data structures have not yet been initialized and thus curthread cannot be accessed; &thread0 is what will become curthread later in hammer_time. Other MD initialization code should be similarly instrumented in order to gain visibility into the time spent before entering mi_startup; this will require some care and testing from people with access to such hardware. Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Dec 31 09:21:34 2017 (r327424) +++ head/sys/amd64/amd64/machdep.c Sun Dec 31 09:22:07 2017 (r327425) @@ -1525,6 +1525,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) size_t kstack0_sz; int late_console; + TSRAW(&thread0, TS_ENTER, __func__, NULL); + /* * This may be done better later if it gets more high level * components in it. If so just link td->td_proc here. @@ -1773,6 +1775,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) x86_init_fdt(); #endif thread0.td_critnest = 0; + + TSEXIT(); /* Location of kernel stack for locore */ return ((u_int64_t)thread0.td_pcb);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712310922.vBV9M7Zd045507>