Author: mm
Date: Mon Feb 11 08:07:56 2013
New Revision: 246654
URL: http://svnweb.freebsd.org/changeset/base/246654

Log:
  Update vendor/illumos/dist and vendor-sys/illumos/dist
  to illumos-gate 13953:0cc6917308f7
  
  Illumos dtrace issues:
    3529 iostat should display time used by dtrace

Modified:
  vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c
  vendor-sys/illumos/dist/uts/common/sys/cpuvar.h

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/stat/common/statcommon.h

Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c  Mon Feb 11 08:06:18 
2013        (r246653)
+++ vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c  Mon Feb 11 08:07:56 
2013        (r246654)
@@ -5861,7 +5861,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a
        size_t size;
        int vtime, onintr;
        volatile uint16_t *flags;
-       hrtime_t now;
+       hrtime_t now, end;
 
        /*
         * Kick out immediately if this CPU is still being born (in which case
@@ -5876,6 +5876,8 @@ dtrace_probe(dtrace_id_t id, uintptr_t a
        cpuid = CPU->cpu_id;
        onintr = CPU_ON_INTR(CPU);
 
+       CPU->cpu_dtrace_probes++;
+
        if (!onintr && probe->dtpr_predcache != DTRACE_CACHEIDNONE &&
            probe->dtpr_predcache == curthread->t_predcache) {
                /*
@@ -6455,8 +6457,11 @@ dtrace_probe(dtrace_id_t id, uintptr_t a
                        buf->dtb_offset = offs + ecb->dte_size;
        }
 
+       end = dtrace_gethrtime();
        if (vtime)
-               curthread->t_dtrace_start = dtrace_gethrtime();
+               curthread->t_dtrace_start = end;
+
+       CPU->cpu_dtrace_nsec += end - now;
 
        dtrace_interrupt_enable(cookie);
 }

Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h
==============================================================================
--- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h     Mon Feb 11 08:06:18 
2013        (r246653)
+++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h     Mon Feb 11 08:07:56 
2013        (r246654)
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #ifndef _SYS_CPUVAR_H
@@ -187,6 +188,9 @@ typedef struct cpu {
        uintptr_t       cpu_dtrace_caller;      /* DTrace: caller, if any */
        hrtime_t        cpu_dtrace_chillmark;   /* DTrace: chill mark time */
        hrtime_t        cpu_dtrace_chilled;     /* DTrace: total chill time */
+       uint64_t        cpu_dtrace_probes;      /* DTrace: total probes fired */
+       hrtime_t        cpu_dtrace_nsec;        /* DTrace: ns in dtrace_probe */
+
        volatile uint16_t cpu_mstate;           /* cpu microstate */
        volatile uint16_t cpu_mstate_gen;       /* generation counter */
        volatile hrtime_t cpu_mstate_start;     /* cpu microstate start time */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to