dtrace で vm_thread_new の呼ばれる場所を探る2017年10月08日 11時02分38秒

11.1-RELEASE 後の 11-stable のコード。
$ dtrace -n 'fbt::vm_thread_new:entry{stack()}'
  0  55259              vm_thread_new:entry 
              kernel`thread_alloc+0x28
              kernel`sys_thr_new+0x67
              kernel`syscall+0xa4b
              kernel`0xc10a18fe

thread_alloc を見ると、thread_zone からメモリを割り当てているようだ。


struct thread*
thread_alloc(int pages)
{
...
    td = (struct thread *)uma_zalloc(thread_zone, M_WAITOK);