Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 2002 23:31:26 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        FreeBSD current users <current@FreeBSD.ORG>
Subject:   amusing KSE ktrace.
Message-ID:  <Pine.BSF.4.21.0209292322010.74299-100000@InterJet.elischer.org>

next in thread | raw e-mail | index | archive | help

It occured to me to day to look at several KSE threads running under 
ktrace..

Talk about confusing..
The key to understanding it is that the lines 

RET fork 0

are actually the upcalls when a thread blocks, and they will report to
the userland scheduler all the RETs that occured since the last
 RET fork 0


In any case it sure is difficult to follow :-)
(6 threads each printing one char and then sleeping)


 17595 ksetest  RET   write 1
 17595 ksetest  CALL  nanosleep(0x84b7fcc,0x84b7fc4)
 17595 ksetest  CALL  nanosleep(0x84a6fcc,0x84a6fc4)
 17595 ksetest  CALL  write(0x1,0xbfbffc17,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "K"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  nanosleep(0x8275fcc,0x8275fc4)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  nanosleep(0x8264fcc,0x8264fc4)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  kse_yield
 17595 ksetest  CALL  nanosleep(0xbfbffc10,0xbfbffc08)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  kse_yield
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  CALL  write(0x1,0x84b7fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "."
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x84a6fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "*"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x8264fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "+"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x8275fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "-"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  nanosleep(0x84b7fcc,0x84b7fc4)
 17595 ksetest  CALL  nanosleep(0x84a6fcc,0x84a6fc4)
 17595 ksetest  CALL  write(0x1,0xbfbffc17,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "L"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  nanosleep(0x8264fcc,0x8264fc4)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  nanosleep(0x8275fcc,0x8275fc4)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  kse_yield
 17595 ksetest  CALL  nanosleep(0xbfbffc10,0xbfbffc08)
 17595 ksetest  RET   fork 0
 17595 ksetest  CALL  kse_yield
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  RET   nanosleep 0
 17595 ksetest  CALL  write(0x1,0x84b7fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "."
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x84a6fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "*"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x8275fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "-"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  write(0x1,0x8264fd3,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte
       "+"
 17595 ksetest  RET   write 1
 17595 ksetest  CALL  nanosleep(0x84b7fcc,0x84b7fc4)
 17595 ksetest  CALL  nanosleep(0x84a6fcc,0x84a6fc4)
 17595 ksetest  CALL  write(0x1,0xbfbffc17,0x1)
 17595 ksetest  GIO   fd 1 wrote 1 byte



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209292322010.74299-100000>