What''s going on? # dtrace -s iotime_all.d 100 dtrace: failed to enable ''iotime_all.d'': DIF program content is invalid The errant script.... #pragma D option quiet BEGIN { stime = timestamp; io_count = 0; } io:::start /args[2]->fi_pathname != "<none>"/ { start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]->b_blkno, args[0]->b_bcount] = timestamp; self->pid = pid; self->name = args[2]->fi_pathname; self->size = args[0]->b_bcount; } io:::start /args[2]->fi_pathname != "<none>"/ { start[pid, args[1]->dev_pathname, args[0]->b_edev, args[0]->b_blkno, args[0]->b_bcount] = timestamp; self->pid = pid; self->name = args[1]->dev_pathname; self->size = args[0]->b_bcount; } io:::done /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, self->size]/ { this->elapsed = timestamp - start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, self->size]; printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, args[1]->dev_statname, self->name, args[0]->b_flags & B_READ ? "R" : "W", args[0]->b_bcount, self->size, this->elapsed / 1000000, (this->elapsed / 1000) % 1000); start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, self->size] = 0; self->pid = 0; self->name = 0; self->size = 0; io_count++; } io:::done /io_count > $1/ { printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / 1000000000); exit (0); }
Might help if I told you what OS and all that stuff. The bits are standard from onnv.sfbay... # uname -a SunOS jlaptop 5.11 onnv-gate:2008-11-28 i86pc i386 i86pc # cat /etc/motd Sun Microsystems Inc. SunOS 5.11 onnv-gate:2008-11-28 January 2008 bfu''ed from /export/home/archives/i386/nightly-nd on 2008-11-28 Sun Microsystems Inc. SunOS 5.11 snv_103 November 2008 # cat /etc/release Solaris Express Community Edition snv_103 X86 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 17 November 2008 Jim --- James Litchfield wrote:> What''s going on? > > # dtrace -s iotime_all.d 100 > dtrace: failed to enable ''iotime_all.d'': DIF program content is invalid > > The errant script.... > > #pragma D option quiet > > BEGIN > { > stime = timestamp; > io_count = 0; > } > > io:::start > /args[2]->fi_pathname != "<none>"/ > { > start[pid, args[2]->fi_pathname, args[0]->b_edev, > args[0]->b_blkno, args[0]->b_bcount] = timestamp; > self->pid = pid; > self->name = args[2]->fi_pathname; > self->size = args[0]->b_bcount; > } > io:::start > /args[2]->fi_pathname != "<none>"/ > { > start[pid, args[1]->dev_pathname, args[0]->b_edev, > args[0]->b_blkno, args[0]->b_bcount] = timestamp; > self->pid = pid; > self->name = args[1]->dev_pathname; > self->size = args[0]->b_bcount; > } > > io:::done > /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, > self->size]/ > { > this->elapsed = timestamp - start[self->pid, self->name, > args[0]->b_edev, args[0]->b_blkno, self->size]; > printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, > args[1]->dev_statname, > self->name, args[0]->b_flags & B_READ ? "R" : "W", > args[0]->b_bcount, self->size, > this->elapsed / 1000000, (this->elapsed / 1000) % 1000); > start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, > self->size] = 0; > self->pid = 0; > self->name = 0; > self->size = 0; > io_count++; > } > io:::done > /io_count > $1/ > { > printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / > 1000000000); > exit (0); > } > >
So as in my previous message, http://www.opensolaris.org/jive/thread.jspa?threadID=84228&tstart=0 if the DTrace version information is much more informative, then this kind of problem would be much easier (even without OS info) -Alex -- This message posted from opensolaris.org
Hey Jim, I was able to reduce this to a simpler case: # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1] = 1; }'' dtrace: failed to enable ''BEGIN'': DIF program content is invalid This failed because the D compiler generated invalid DIF in that it used too many virutal registers. If you try one more key, the error is properly identified. # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }'' dtrace: invalid probe specifier BEGIN{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }: Insufficient registers to generate code It looks like libdtrace is happily allocating a 9th register even though there are only 8: # dtrace -c ''/usr/sbin/i86/dtrace -s /var/tmp/foo.d'' -n ''pid$target::dt_regset_alloc:return{ trace(arg1); }'' dtrace: description ''pid$target::dt_regset_alloc:return'' matched 1 probe dtrace: failed to compile script /var/tmp/foo.d: Insufficient registers to generate code dtrace: pid 101053 has exited CPU ID FUNCTION:NAME 0 73111 dt_regset_alloc:return 0 0 73111 dt_regset_alloc:return 1 0 73111 dt_regset_alloc:return 2 0 73111 dt_regset_alloc:return 3 0 73111 dt_regset_alloc:return 4 0 73111 dt_regset_alloc:return 5 0 73111 dt_regset_alloc:return 6 0 73111 dt_regset_alloc:return 7 0 73111 dt_regset_alloc:return 8 0 73111 dt_regset_alloc:return 4294967295 It looks like there''s a simple fix in dt_regset_create() which is not to add one to the number of registers we''ve been told exist. I''ve filed this bug for you: 6778459 libdtrace will allocate one more register than there exists Adam On Sun, Nov 30, 2008 at 08:36:50PM -0800, James Litchfield wrote:> What''s going on? > > # dtrace -s iotime_all.d 100 > dtrace: failed to enable ''iotime_all.d'': DIF program content is invalid > > The errant script.... > > #pragma D option quiet > > BEGIN > { > stime = timestamp; > io_count = 0; > } > > io:::start > /args[2]->fi_pathname != "<none>"/ > { > start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]->b_blkno, > args[0]->b_bcount] = timestamp; > self->pid = pid; > self->name = args[2]->fi_pathname; > self->size = args[0]->b_bcount; > } > io:::start > /args[2]->fi_pathname != "<none>"/ > { > start[pid, args[1]->dev_pathname, args[0]->b_edev, > args[0]->b_blkno, args[0]->b_bcount] = timestamp; > self->pid = pid; > self->name = args[1]->dev_pathname; > self->size = args[0]->b_bcount; > } > > io:::done > /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, > self->size]/ > { > this->elapsed = timestamp - start[self->pid, self->name, > args[0]->b_edev, args[0]->b_blkno, self->size]; > printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, > args[1]->dev_statname, > self->name, args[0]->b_flags & B_READ ? "R" : "W", > args[0]->b_bcount, self->size, > this->elapsed / 1000000, (this->elapsed / 1000) % 1000); > start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, > self->size] = 0; > self->pid = 0; > self->name = 0; > self->size = 0; > io_count++; > } > io:::done > /io_count > $1/ > { > printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / > 1000000000); > exit (0); > } > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
How does one make the compiler generate runnable code with such D input? Adam Leventhal wrote:> Hey Jim, > > I was able to reduce this to a simpler case: > > # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1] = 1; }'' > dtrace: failed to enable ''BEGIN'': DIF program content is invalid > > This failed because the D compiler generated invalid DIF in that it used > too many virutal registers. > > If you try one more key, the error is properly identified. > > # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }'' > dtrace: invalid probe specifier BEGIN{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }: > Insufficient registers to generate code > > It looks like libdtrace is happily allocating a 9th register even > though there are only 8: > > # dtrace -c ''/usr/sbin/i86/dtrace -s /var/tmp/foo.d'' -n ''pid$target::dt_regset_alloc:return{ trace(arg1); }'' > dtrace: description ''pid$target::dt_regset_alloc:return'' matched 1 probe > dtrace: failed to compile script /var/tmp/foo.d: Insufficient registers to > generate code > dtrace: pid 101053 has exited > CPU ID FUNCTION:NAME > 0 73111 dt_regset_alloc:return 0 > 0 73111 dt_regset_alloc:return 1 > 0 73111 dt_regset_alloc:return 2 > 0 73111 dt_regset_alloc:return 3 > 0 73111 dt_regset_alloc:return 4 > 0 73111 dt_regset_alloc:return 5 > 0 73111 dt_regset_alloc:return 6 > 0 73111 dt_regset_alloc:return 7 > 0 73111 dt_regset_alloc:return 8 > 0 73111 dt_regset_alloc:return 4294967295 > > It looks like there''s a simple fix in dt_regset_create() which is not to add > one to the number of registers we''ve been told exist. I''ve filed this bug > for you: > > 6778459 libdtrace will allocate one more register than there exists > > Adam > > On Sun, Nov 30, 2008 at 08:36:50PM -0800, James Litchfield wrote: >> What''s going on? >> >> # dtrace -s iotime_all.d 100 >> dtrace: failed to enable ''iotime_all.d'': DIF program content is invalid >> >> The errant script.... >> >> #pragma D option quiet >> >> BEGIN >> { >> stime = timestamp; >> io_count = 0; >> } >> >> io:::start >> /args[2]->fi_pathname != "<none>"/ >> { >> start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]->b_blkno, >> args[0]->b_bcount] = timestamp; >> self->pid = pid; >> self->name = args[2]->fi_pathname; >> self->size = args[0]->b_bcount; >> } >> io:::start >> /args[2]->fi_pathname != "<none>"/ >> { >> start[pid, args[1]->dev_pathname, args[0]->b_edev, >> args[0]->b_blkno, args[0]->b_bcount] = timestamp; >> self->pid = pid; >> self->name = args[1]->dev_pathname; >> self->size = args[0]->b_bcount; >> } >> >> io:::done >> /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >> self->size]/ >> { >> this->elapsed = timestamp - start[self->pid, self->name, >> args[0]->b_edev, args[0]->b_blkno, self->size]; >> printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, >> args[1]->dev_statname, >> self->name, args[0]->b_flags & B_READ ? "R" : "W", >> args[0]->b_bcount, self->size, >> this->elapsed / 1000000, (this->elapsed / 1000) % 1000); >> start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >> self->size] = 0; >> self->pid = 0; >> self->name = 0; >> self->size = 0; >> io_count++; >> } >> io:::done >> /io_count > $1/ >> { >> printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / >> 1000000000); >> exit (0); >> } >> >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org >
You can''t. Right now this is a limitation of the compiler. If it''s a common use case we can likely find a solution. Adam On Dec 2, 2008, at 10:25 PM, Dan Mick wrote:> How does one make the compiler generate runnable code with such D > input? > > Adam Leventhal wrote: >> Hey Jim, >> I was able to reduce this to a simpler case: >> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1] = 1; }'' >> dtrace: failed to enable ''BEGIN'': DIF program content is invalid >> This failed because the D compiler generated invalid DIF in that it >> used >> too many virutal registers. >> If you try one more key, the error is properly identified. >> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }'' >> dtrace: invalid probe specifier BEGIN{ foo[1, 1, 1, 1, 1, 1, 1] = >> 1; }: >> Insufficient registers to generate code >> It looks like libdtrace is happily allocating a 9th register even >> though there are only 8: >> # dtrace -c ''/usr/sbin/i86/dtrace -s /var/tmp/foo.d'' -n ''pid >> $target::dt_regset_alloc:return{ trace(arg1); }'' >> dtrace: description ''pid$target::dt_regset_alloc:return'' matched 1 >> probe >> dtrace: failed to compile script /var/tmp/foo.d: Insufficient >> registers to >> generate code >> dtrace: pid 101053 has exited >> CPU ID FUNCTION:NAME >> 0 73111 dt_regset_alloc:return 0 >> 0 73111 dt_regset_alloc:return 1 >> 0 73111 dt_regset_alloc:return 2 >> 0 73111 dt_regset_alloc:return 3 >> 0 73111 dt_regset_alloc:return 4 >> 0 73111 dt_regset_alloc:return 5 >> 0 73111 dt_regset_alloc:return 6 >> 0 73111 dt_regset_alloc:return 7 >> 0 73111 dt_regset_alloc:return 8 >> 0 73111 dt_regset_alloc:return 4294967295 >> It looks like there''s a simple fix in dt_regset_create() which is >> not to add >> one to the number of registers we''ve been told exist. I''ve filed >> this bug >> for you: >> 6778459 libdtrace will allocate one more register than there exists >> Adam >> On Sun, Nov 30, 2008 at 08:36:50PM -0800, James Litchfield wrote: >>> What''s going on? >>> >>> # dtrace -s iotime_all.d 100 >>> dtrace: failed to enable ''iotime_all.d'': DIF program content is >>> invalid >>> >>> The errant script.... >>> >>> #pragma D option quiet >>> >>> BEGIN >>> { >>> stime = timestamp; >>> io_count = 0; >>> } >>> >>> io:::start >>> /args[2]->fi_pathname != "<none>"/ >>> { >>> start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]- >>> >b_blkno, args[0]->b_bcount] = timestamp; >>> self->pid = pid; >>> self->name = args[2]->fi_pathname; >>> self->size = args[0]->b_bcount; >>> } >>> io:::start >>> /args[2]->fi_pathname != "<none>"/ >>> { >>> start[pid, args[1]->dev_pathname, args[0]->b_edev, args[0]- >>> >b_blkno, args[0]->b_bcount] = timestamp; >>> self->pid = pid; >>> self->name = args[1]->dev_pathname; >>> self->size = args[0]->b_bcount; >>> } >>> >>> io:::done >>> /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >>> self->size]/ >>> { >>> this->elapsed = timestamp - start[self->pid, self->name, >>> args[0]->b_edev, args[0]->b_blkno, self->size]; >>> printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, >>> args[1]->dev_statname, >>> self->name, args[0]->b_flags & B_READ ? "R" : "W", >>> args[0]->b_bcount, self->size, >>> this->elapsed / 1000000, (this->elapsed / 1000) % 1000); >>> start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >>> self->size] = 0; >>> self->pid = 0; >>> self->name = 0; >>> self->size = 0; >>> io_count++; >>> } >>> io:::done >>> /io_count > $1/ >>> { >>> printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / >>> 1000000000); >>> exit (0); >>> } >>> >>> _______________________________________________ >>> dtrace-discuss mailing list >>> dtrace-discuss at opensolaris.org >-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
OK. I don''t know if it is or not, but Jim ran into it on what seems like a valid D script. I''m guessing his problem was because of the multi-dimensional aggregation index? Can the error message indicate the D line that caused the problem? Adam Leventhal wrote:> You can''t. Right now this is a limitation of the compiler. If it''s a > common use case we can likely find a solution. > > Adam > > On Dec 2, 2008, at 10:25 PM, Dan Mick wrote: > >> How does one make the compiler generate runnable code with such D >> input? >> >> Adam Leventhal wrote: >>> Hey Jim, >>> I was able to reduce this to a simpler case: >>> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1] = 1; }'' >>> dtrace: failed to enable ''BEGIN'': DIF program content is invalid >>> This failed because the D compiler generated invalid DIF in that it >>> used >>> too many virutal registers. >>> If you try one more key, the error is properly identified. >>> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }'' >>> dtrace: invalid probe specifier BEGIN{ foo[1, 1, 1, 1, 1, 1, 1] = >>> 1; }: >>> Insufficient registers to generate code >>> It looks like libdtrace is happily allocating a 9th register even >>> though there are only 8: >>> # dtrace -c ''/usr/sbin/i86/dtrace -s /var/tmp/foo.d'' -n ''pid >>> $target::dt_regset_alloc:return{ trace(arg1); }'' >>> dtrace: description ''pid$target::dt_regset_alloc:return'' matched 1 >>> probe >>> dtrace: failed to compile script /var/tmp/foo.d: Insufficient >>> registers to >>> generate code >>> dtrace: pid 101053 has exited >>> CPU ID FUNCTION:NAME >>> 0 73111 dt_regset_alloc:return 0 >>> 0 73111 dt_regset_alloc:return 1 >>> 0 73111 dt_regset_alloc:return 2 >>> 0 73111 dt_regset_alloc:return 3 >>> 0 73111 dt_regset_alloc:return 4 >>> 0 73111 dt_regset_alloc:return 5 >>> 0 73111 dt_regset_alloc:return 6 >>> 0 73111 dt_regset_alloc:return 7 >>> 0 73111 dt_regset_alloc:return 8 >>> 0 73111 dt_regset_alloc:return 4294967295 >>> It looks like there''s a simple fix in dt_regset_create() which is >>> not to add >>> one to the number of registers we''ve been told exist. I''ve filed >>> this bug >>> for you: >>> 6778459 libdtrace will allocate one more register than there exists >>> Adam >>> On Sun, Nov 30, 2008 at 08:36:50PM -0800, James Litchfield wrote: >>>> What''s going on? >>>> >>>> # dtrace -s iotime_all.d 100 >>>> dtrace: failed to enable ''iotime_all.d'': DIF program content is >>>> invalid >>>> >>>> The errant script.... >>>> >>>> #pragma D option quiet >>>> >>>> BEGIN >>>> { >>>> stime = timestamp; >>>> io_count = 0; >>>> } >>>> >>>> io:::start >>>> /args[2]->fi_pathname != "<none>"/ >>>> { >>>> start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]- >>>>> b_blkno, args[0]->b_bcount] = timestamp; >>>> self->pid = pid; >>>> self->name = args[2]->fi_pathname; >>>> self->size = args[0]->b_bcount; >>>> } >>>> io:::start >>>> /args[2]->fi_pathname != "<none>"/ >>>> { >>>> start[pid, args[1]->dev_pathname, args[0]->b_edev, args[0]- >>>>> b_blkno, args[0]->b_bcount] = timestamp; >>>> self->pid = pid; >>>> self->name = args[1]->dev_pathname; >>>> self->size = args[0]->b_bcount; >>>> } >>>> >>>> io:::done >>>> /start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >>>> self->size]/ >>>> { >>>> this->elapsed = timestamp - start[self->pid, self->name, >>>> args[0]->b_edev, args[0]->b_blkno, self->size]; >>>> printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, >>>> args[1]->dev_statname, >>>> self->name, args[0]->b_flags & B_READ ? "R" : "W", >>>> args[0]->b_bcount, self->size, >>>> this->elapsed / 1000000, (this->elapsed / 1000) % 1000); >>>> start[self->pid, self->name, args[0]->b_edev, args[0]->b_blkno, >>>> self->size] = 0; >>>> self->pid = 0; >>>> self->name = 0; >>>> self->size = 0; >>>> io_count++; >>>> } >>>> io:::done >>>> /io_count > $1/ >>>> { >>>> printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / >>>> 1000000000); >>>> exit (0); >>>> } >>>> >>>> _______________________________________________ >>>> dtrace-discuss mailing list >>>> dtrace-discuss at opensolaris.org > > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
The error message without this bug would have identified the DIF offset which could then be used to manually determine the line of the source file. Doing it programmatically is a long-standing RFE. Adam On Dec 2, 2008, at 10:43 PM, Dan Mick wrote:> OK. I don''t know if it is or not, but Jim ran into it on what seems > like a valid D script. I''m guessing his problem was because of the > multi-dimensional aggregation index? Can the error message indicate > the D line that caused the problem? > > Adam Leventhal wrote: >> You can''t. Right now this is a limitation of the compiler. If it''s >> a common use case we can likely find a solution. >> Adam >> On Dec 2, 2008, at 10:25 PM, Dan Mick wrote: >>> How does one make the compiler generate runnable code with such D >>> input? >>> >>> Adam Leventhal wrote: >>>> Hey Jim, >>>> I was able to reduce this to a simpler case: >>>> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1] = 1; }'' >>>> dtrace: failed to enable ''BEGIN'': DIF program content is invalid >>>> This failed because the D compiler generated invalid DIF in that >>>> it used >>>> too many virutal registers. >>>> If you try one more key, the error is properly identified. >>>> # dtrace -n BEGIN''{ foo[1, 1, 1, 1, 1, 1, 1] = 1; }'' >>>> dtrace: invalid probe specifier BEGIN{ foo[1, 1, 1, 1, 1, 1, 1] >>>> = 1; }: >>>> Insufficient registers to generate code >>>> It looks like libdtrace is happily allocating a 9th register even >>>> though there are only 8: >>>> # dtrace -c ''/usr/sbin/i86/dtrace -s /var/tmp/foo.d'' -n ''pid >>>> $target::dt_regset_alloc:return{ trace(arg1); }'' >>>> dtrace: description ''pid$target::dt_regset_alloc:return'' matched >>>> 1 probe >>>> dtrace: failed to compile script /var/tmp/foo.d: Insufficient >>>> registers to >>>> generate code >>>> dtrace: pid 101053 has exited >>>> CPU ID FUNCTION:NAME >>>> 0 73111 dt_regset_alloc:return 0 >>>> 0 73111 dt_regset_alloc:return 1 >>>> 0 73111 dt_regset_alloc:return 2 >>>> 0 73111 dt_regset_alloc:return 3 >>>> 0 73111 dt_regset_alloc:return 4 >>>> 0 73111 dt_regset_alloc:return 5 >>>> 0 73111 dt_regset_alloc:return 6 >>>> 0 73111 dt_regset_alloc:return 7 >>>> 0 73111 dt_regset_alloc:return 8 >>>> 0 73111 dt_regset_alloc:return 4294967295 >>>> It looks like there''s a simple fix in dt_regset_create() which >>>> is not to add >>>> one to the number of registers we''ve been told exist. I''ve filed >>>> this bug >>>> for you: >>>> 6778459 libdtrace will allocate one more register than there exists >>>> Adam >>>> On Sun, Nov 30, 2008 at 08:36:50PM -0800, James Litchfield wrote: >>>>> What''s going on? >>>>> >>>>> # dtrace -s iotime_all.d 100 >>>>> dtrace: failed to enable ''iotime_all.d'': DIF program content is >>>>> invalid >>>>> >>>>> The errant script.... >>>>> >>>>> #pragma D option quiet >>>>> >>>>> BEGIN >>>>> { >>>>> stime = timestamp; >>>>> io_count = 0; >>>>> } >>>>> >>>>> io:::start >>>>> /args[2]->fi_pathname != "<none>"/ >>>>> { >>>>> start[pid, args[2]->fi_pathname, args[0]->b_edev, args[0]- >>>>>> b_blkno, args[0]->b_bcount] = timestamp; >>>>> self->pid = pid; >>>>> self->name = args[2]->fi_pathname; >>>>> self->size = args[0]->b_bcount; >>>>> } >>>>> io:::start >>>>> /args[2]->fi_pathname != "<none>"/ >>>>> { >>>>> start[pid, args[1]->dev_pathname, args[0]->b_edev, args[0]- >>>>>> b_blkno, args[0]->b_bcount] = timestamp; >>>>> self->pid = pid; >>>>> self->name = args[1]->dev_pathname; >>>>> self->size = args[0]->b_bcount; >>>>> } >>>>> >>>>> io:::done >>>>> /start[self->pid, self->name, args[0]->b_edev, args[0]- >>>>> >b_blkno, self->size]/ >>>>> { >>>>> this->elapsed = timestamp - start[self->pid, self->name, >>>>> args[0]->b_edev, args[0]->b_blkno, self->size]; >>>>> printf("%5u %10s %58s %2s %8u %8u %3d.%03d\n", self->pid, >>>>> args[1]->dev_statname, >>>>> self->name, args[0]->b_flags & B_READ ? "R" : "W", >>>>> args[0]->b_bcount, self->size, >>>>> this->elapsed / 1000000, (this->elapsed / 1000) % 1000); >>>>> start[self->pid, self->name, args[0]->b_edev, args[0]- >>>>> >b_blkno, self->size] = 0; >>>>> self->pid = 0; >>>>> self->name = 0; >>>>> self->size = 0; >>>>> io_count++; >>>>> } >>>>> io:::done >>>>> /io_count > $1/ >>>>> { >>>>> printf("Elapsed Time: %u seconds\n\n", (timestamp - stime) / >>>>> 1000000000); >>>>> exit (0); >>>>> } >>>>> >>>>> _______________________________________________ >>>>> dtrace-discuss mailing list >>>>> dtrace-discuss at opensolaris.org >> -- >> Adam Leventhal, Fishworks http://blogs.sun.com/ahl >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org >-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl