Dummy
2005-Nov-05 09:15 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
Hi, How to get the virtual address of the pagefaults when the application is cold started. I mean that which prob should i use to get the virtual address due to which the page fault occur? Thanks, Dummy This message posted from opensolaris.org
Brendan Gregg
2005-Nov-05 13:12 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
G''Day, On Sat, 5 Nov 2005, Dummy wrote:> Hi, > How to get the virtual address of the pagefaults when the > application is cold started. I mean that which prob should i use to get > the virtual address due to which the page fault occur?>From your description I''m guessing you are interested in executable pagefaults that cause a page in? I''m not sure why the virtual address is most interesting, rather than say the pathname of the file it''s paging in from (which the io provider does nicely), but not to worry... I''ve just punched out the following tool, # epiva.d PID CMD VADDR SIZE PATH 8766 atq d27ca000 4096 /lib/libbsm.so.1 8766 atq d27c7000 4096 /lib/libbsm.so.1 8766 atq d2794000 4096 /lib/libsecdb.so.1 8766 atq d25b3000 4096 /lib/libcmd.so.1 8766 atq d27c8000 4096 /lib/libbsm.so.1 8766 atq d27b5000 4096 /lib/libbsm.so.1 2065 nscd 8051000 4096 /usr/sbin/nscd 8770 expr d2744000 4096 /usr/lib/libc/libc_hwcap1.so.1 And the code behind it is below (which I bet I''ll regret posting since I haven''t thought too long and hard about this yet, and so there is probably a bad assumption somewhere!). cheers, Brendan ----- #!/usr/sbin/dtrace -s #pragma D option quiet dtrace:::BEGIN { /* print header */ printf("%6s %-16s %16s %6s %s\n", "PID", "CMD", "VADDR", "SIZE", "PATH"); } fbt::segvn_fault:entry { /* save segvn fault details */ self->vaddr = arg2; self->size = arg3; self->vp = (struct vnode *)((struct segvn_data *)args[1]->s_data)->vp; } vminfo:::execpgin { /* match on executable page ins */ self->ok = 1; } fbt::segvn_fault:return /self->ok/ { /* print details */ printf("%6d %-16s %16x %6d %s\n", pid, execname, self->vaddr, self->size, self->vp == 0 ? "?" : stringof(self->vp->v_path)); } fbt::segvn_fault:return { /* clear variables */ self->vaddr = 0; self->size = 0; self->vp = 0; self->ok = 0; }
Brendan Gregg
2005-Nov-05 13:33 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
Ok (regret already) I''ve just added a line to this function, On Sun, 6 Nov 2005, Brendan Gregg wrote: [...]> fbt::segvn_fault:entry > { > /* save segvn fault details */ > self->vaddr = arg2; > self->size = arg3; > self->vp = (struct vnode *)((struct segvn_data *)args[1]->s_data)->vp;self->ok = 0;> }It makes little difference, it was just lazy not to. Brendan
Brendan Gregg
2005-Nov-05 13:45 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
G''Day folks, Anyone notice the mailing list misbehaving by adding auto-quoting? On Sun, 6 Nov 2005, Brendan Gregg wrote: [...]> >From your description I''m guessing you are interested in executable page > faults that cause a page in?I don''t normally make those typos. This is a cat -vet from my sent mail, $>From your description I''m guessing you are interested in executable page$faults that cause a page in?$ $ And now from the returned mail, $>From your description I''m guessing you are interested in executable page$faults that cause a page in?$ $ I wonder how the ">" got there. This could be pine misbehaving (yeah, I should be using mutt)... (I think it''s another job for DTrace ;) Brendan
Jonathan Adams
2005-Nov-05 17:10 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
On 11/5/05, Brendan Gregg <brendan.gregg at tpg.com.au> wrote:> G''Day folks, > > Anyone notice the mailing list misbehaving by adding auto-quoting?...> $ > >From your description I''m guessing you are interested in executable page$ > faults that cause a page in?$ > $ > > I wonder how the ">" got there. This could be pine misbehaving (yeah, I > should be using mutt)...Standard Unix mailer thing; the Unix mbox format uses ''From '' at the beginning of the line as a message deliminator, so any instance of it in an outgoing piece of mail gets ''> '' tacked on to the front. Cheers, - jonathan
Brendan Gregg
2005-Nov-05 17:13 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
Sorry, just realised this isn''t auto-quoting at all - it''s that blastard prehistoric sendmail feature to escape "From" lines. grr, curse you sendmail! I feel a "DTracing sendmail" website coming along... :) Brendan On Sun, 6 Nov 2005, Brendan Gregg wrote:> G''Day folks, > > Anyone notice the mailing list misbehaving by adding auto-quoting? > > On Sun, 6 Nov 2005, Brendan Gregg wrote: > [...] > > >From your description I''m guessing you are interested in executable page > > faults that cause a page in? > > I don''t normally make those typos. This is a cat -vet from my sent mail, > > $ > >From your description I''m guessing you are interested in executable page$ > faults that cause a page in?$ > $ > > And now from the returned mail, > > $ > >From your description I''m guessing you are interested in executable page$ > faults that cause a page in?$ > $ > > I wonder how the ">" got there. This could be pine misbehaving (yeah, I > should be using mutt)... > > (I think it''s another job for DTrace ;) > > Brendan > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org > >
Brendan Gregg
2005-Nov-05 17:17 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
G''Day Jonathan, ahh, you''re right - it is mbox, can''t blame sendmail for this one! Brendan On Sat, 5 Nov 2005, Jonathan Adams wrote:> On 11/5/05, Brendan Gregg <brendan.gregg at tpg.com.au> wrote: > > G''Day folks, > > > > Anyone notice the mailing list misbehaving by adding auto-quoting? > ... > > $ > > >From your description I''m guessing you are interested in executable page$ > > faults that cause a page in?$ > > $ > > > > I wonder how the ">" got there. This could be pine misbehaving (yeah, I > > should be using mutt)... > > Standard Unix mailer thing; the Unix mbox format uses ''From '' at the > beginning of the line as a message deliminator, so any instance of it > in an outgoing piece of mail gets ''> '' tacked on to the front. > > Cheers, > - jonathan > >
Alan Coopersmith
2005-Nov-05 17:18 UTC
[dtrace-discuss] Virtual address of the pagefaults when the application is cold start
Brendan Gregg wrote:> $ >>From your description I''m guessing you are interested in executable page$ > faults that cause a page in?$ > $ > > I wonder how the ">" got there. This could be pine misbehaving (yeah, I > should be using mutt)...It''s been a long time since I did MTA configuration, but sendmail used to have an option to quote From lines when doing final delivery for compatibility with BSD mailbox format in which a line starting with "From " was the message delimiter. The intermediate MTA''s like those forwarding the mailing list messages shouldn''t be doing that though. -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering