From 93ca8057c54f5408381bf851437c21158ee70efb Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Sun, 9 Jun 2019 15:45:48 +0000 Subject: [PATCH] Add TSLOG events to initriscv() Add the enter and exit events, similar to what's found in hammer_time() on amd64. We must use TSRAW as the pcpu isn't yet initialized. Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20497 --- sys/riscv/riscv/machdep.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 7a1850c7e307..1706464028c2 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -816,6 +817,8 @@ initriscv(struct riscv_bootparams *rvbp) caddr_t kmdp; int i; + TSRAW(&thread0, TS_ENTER, __func__, NULL); + /* Set the pcpu data, this is needed by pmap_bootstrap */ pcpup = &__pcpu[0]; pcpu_init(pcpup, 0, sizeof(struct pcpu)); @@ -888,6 +891,8 @@ initriscv(struct riscv_bootparams *rvbp) kdb_init(); early_boot = 0; + + TSEXIT(); } #undef bzero