Displaying 10 results from an estimated 10 matches for "curpsinfo".
2006 Aug 08
9
Handling userland char ** pointers
I''ve been trying to get access to a userland string that''s behind a
second level pointer using DTrace, but I can''t seem to get it to work.
I started with the example on the Team DTrace Tips and Tricks slides:
trace(copyinstr(*(uintptr_t *)copyin(arg0, curpsinfo->pr_dmodel ==
PR_MODEL_ILP32 ? 4 : 8)));
And when I couldn''t get it to work, I started breaking it down into
smaller pieces to see what was going on at each step. Here''s the "C"
and "D" code:
--- pt.c ---
static int sz = sizeof(char *);
main()
{
c...
2010 Mar 19
2
Using DTrace in 32-bit to handle 64-bit parameters [72631230]
...king:
> Small example:
> provider adv {
> probe myprobe(int64_t param1, int32_t param2, int64_t
> param3);
> };
>
> Dtrace probe:
> adv$1:::myprobe
> {
> /* translation section */
> this->param1 = (curpsinfo->pr_dmodel == PR_MODEL_LP64) ?
> arg0 : (`utsname.machine == "i86pc") ? ((arg1 << 32) |
> arg0) : ((arg0 << 32) | arg1);
> this->param2 = (curpsinfo->pr_dmodel == PR_MODEL_LP64) ?
> arg1 : arg2;
>...
2006 Jul 17
7
access to errno when using pid provider
I would like to know how to get access to errno when using pid provider to probe calls to
libc functions like fopen(). The built-in errno appears to be only for system calls. What I''d
like to be able to do is investigate where in an application I''m encountering EMFILE and
what the stack looks like at the time.
This message posted from opensolaris.org
2006 Nov 16
6
DTrace hooks for CPU caps
...pucaps-sleep
{
sleep[args[1]->pr_pid] = timestamp;
}
sched:::cpucaps-wakeup
/sleep[args[1]->pr_pid]/
{
this->delta = timestamp - sleep[args[1]->pr_pid];
@sleeps[args[1]->pr_fname] = sum(this->delta);
@total[args[1]->pr_fname] = sum(this->delta);
}
sched:::on-cpu
/sleep[curpsinfo->pr_pid]/
{
oncpu[curpsinfo->pr_pid] = timestamp;
}
sched:::off-cpu
/oncpu[curpsinfo->pr_pid]/
{
this->delta = timestamp - oncpu[curpsinfo->pr_pid];
@cpu[curpsinfo->pr_fname] = sum(this->delta);
@total[curpsinfo->pr_fname] = sum(this->delta);
}
END
{
/*
* Normali...
2008 Oct 23
1
query re memory profiling
Hi
I have a Dtrace script ( attached ) which examines memory usage, using
fbt:genunix:anon_resvmem:entry & return
On my T2000 it totals the 65k pages being reserved by my application,
printing out the total in bytes.
Seems to work well, tested with a small app that malloced < 65 K,
malloced 200M and mmapeed a 16M file and it appeared to get things correct.
Could I just get a second pair
2006 Feb 15
4
Script for Stackdepth by Thread/LWP?
I''m interested in monitoring the amount of stack used by a multi-threaded program. I assume ''stackdepth'' built-in would be useful...but not sure. Been through demo''s, ToolKit, and internals..but it''s just not clicking for me yet.
Not sure how to measure start/end of stack size dynamically...Anyone know how to break this down?
This message posted from
2007 Jul 30
3
dtrace
hi fnds,
i want to print the filenames on which the stat system
call is acting when a stat system call is invoked. can anyone can help
me this regard.
Thanks
jeevan
2008 Oct 01
5
ustack()s of SIGSEGV''ed programs
Hi all,
I am trying to write a D script which would print ustack() for every
program in the system receiving SIGSEGV. All the stacks printed in
trap()/sigtoproc() context do not have meaningful symbols.
The following solves the problem to some degree but I''d much rather have
a self-contained D script.
dtrace -w -n ''fbt:genunix:sigtoproc:entry/arg2 == 11/ {
2007 Jan 10
13
[DTrace] how to get socket read size
...and an
explanation of how the args work if i''m missing something
Thanks
James Dickens
information relied on:
from socketsize.d
/*
** Process Socket Write
*/
fbt:sockfs:so_update_attrs:entry
/arg1 == 1/
{
/* fetch details */
this->size = arg3;
cmd = (string)curpsinfo->pr_psargs;
/* store details */
@Size[pid,cmd] = quantize(this->size);
}
from src/src/uts/common/fs/sockfs/socksubr.c
void
so_update_attrs(struct sonode *so, int flag)
_______________________________________________
DTrace mailing list
DTrace@opensolaris.org
https://www.ope...
2009 Nov 19
11
dtracing a forked process OR dynamic library
Hi,
I am tracking down a problem and would like to know how I can follow a
forked process with my dtrace script, or how I can trace a dynamic library.
Here is the problem. I am tracing dtlogin, and specifically I am trying
to determine what error libpkcs11`<routine> is returning. It turns out
dtlogin forks a lot of processes, and I believe the second forked
process is the one that winds