after removed lquantize and quantize, 
#!/usr/sbin/dtrace -qCs

dtrace:::BEGIN
{
        printf("Tracing...Hit Ctrl-C to end.\n");
}

fbt:sd:sdstrategy:entry
{
        start[(struct buf *)arg0] = timestamp;
}

fbt:sd:sdintr:entry
/ start[(this->buf = (struct buf *)((struct scsi_pkt *)arg0)->pkt_private)] != 
0 /
{
        this->un = ((struct sd_xbuf *) this->buf->b_private)->xb_un;

        this->scsi_device = ((struct sd_lun *)this->un)->un_sd;

        this->scsi_address = ((struct scsi_device 
*)this->scsi_device)->sd_address;

        this->tgt_id = ((struct scsi_address)this->scsi_address).a_target;
        this->lun_id = ((struct scsi_address)this->scsi_address).a_lun;

        this->sd_dev = ((struct scsi_device *)this->scsi_device)->sd_dev;

        this->devi_addr = ((struct dev_info *)this->sd_dev)->devi_addr;

        start[this->buf] = 0;
}

the CPU utilization changed from 73% to 91%

after remove all the casts:

#!/usr/sbin/dtrace -qCs

dtrace:::BEGIN
{
        printf("Tracing...Hit Ctrl-C to end.\n");
}

fbt:sd:sdstrategy:entry
{
        start[(struct buf *)arg0] = timestamp;
}

fbt:sd:sdintr:entry
/ start[(this->buf = (struct buf *)((struct scsi_pkt *)arg0)->pkt_private)] != 
0 /
{
        start[this->buf] = 0;
}

The CPU utilization change is from 73% to 83% 

With the following code:

#!/usr/sbin/dtrace -qCs

dtrace:::BEGIN
{
        printf("Tracing...Hit Ctrl-C to end.\n");
}

fbt:sd:sdstrategy:entry
{
}

fbt:sd:sdintr:entry
{
}

CPU utilization is from 73% to 76%


With this code:
fbt:sd:sdintr:entry
/ start[(this->buf = (struct buf *)((struct scsi_pkt *)arg0)->pkt_private)] != 
0 /
{
        this->un = ((struct sd_xbuf *) this->buf->b_private)->xb_un;

        this->scsi_device = ((struct sd_lun *)this->un)->un_sd;

        this->scsi_address = ((struct scsi_device 
*)this->scsi_device)->sd_address;

        this->tgt_id = ((struct scsi_address)this->scsi_address).a_target;
        this->lun_id = ((struct scsi_address)this->scsi_address).a_lun;


        start[this->buf] = 0;

}

CPU utilization is from 73% to 90%

Thanks.


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to