[dtrace-discuss] track program time - need some guidelines

tester
2009-07-11T13:03:03Z

> > syscall::open:entry
> > /pid > 0/
> > {
> >        this->lwp = curthread->t_lwp;
> >        printf("Current USER time: %d for thread %u
> in pid %u\n",
> >            this->lwp->lwp_mstate.ms_acct[LMS_USER],
> >            curthread->t_tid, pid);
> > }

Thanks Jim. Wouldn''t this miss the case if a thread doesn''t
make any system calls. Also, I am assuming all syscalls from pid needs to be
monitored. Is there a noticeable perf impact to pid from that approach? WIll
something from sched provider make it easier?

Thanks
--
This message posted from opensolaris.org