Nevermind... pid provider... get to have pid hardcoded, or at least as a macro variable. Dropped a brain cell, I guess.
What about taking some cues from Brendan's scripts and imbed the D script in a shell script. But the problem of course is getting the D script started in time. Could you introduce a shell script, with the same name as the program that is being called, that in turn calls the real program using DTrace? Chip > -----Original Message----- > From: dtrace-discuss-boun...@opensolaris.org [mailto:dtrace-discuss- > boun...@opensolaris.org] On Behalf Of Chip Bennett > Sent: Monday, December 29, 2008 10:45 AM > To: Vladimir Kvashin; dtrace-discuss@opensolaris.org > Subject: Re: [dtrace-discuss] Is there any way to trace malloc without > usingpidprovider? > > Malloc calls the brk system call to actually get new memory blocks from > the system, but it manages that memory itself, keeping a free list for > future allocation. So that may or may not be helpful. > > Does the program have a unique enough execname, that you can check that > in the predicate rather than the pid? Or is there a unique call at the > beginning, like an mmapped or opened file that you can use as a > trigger? > > Chip > > > -----Original Message----- > > From: dtrace-discuss-boun...@opensolaris.org [mailto:dtrace-discuss- > > boun...@opensolaris.org] On Behalf Of Vladimir Kvashin > > Sent: Monday, December 29, 2008 10:35 AM > > To: dtrace-discuss@opensolaris.org > > Subject: [dtrace-discuss] Is there any way to trace malloc without > > using pidprovider? > > > > Hi, > > > > Is there any way to trace malloc without using pid provider? > > > > The issue is that the program we need to trace is a short-living one > > and we don't know its pid at the time dtrace is launched; but we can > > get this pid some moment later. > > -- > > This message posted from opensolaris.org > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss@opensolaris.org > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss@opensolaris.org _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org