From owner-svn-src-all@FreeBSD.ORG Mon Feb 11 08:07:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B2EB4727; Mon, 11 Feb 2013 08:07:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 87A15C1A; Mon, 11 Feb 2013 08:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1B87vOX009999; Mon, 11 Feb 2013 08:07:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1B87vuC009995; Mon, 11 Feb 2013 08:07:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201302110807.r1B87vuC009995@svn.freebsd.org> From: Martin Matuska Date: Mon, 11 Feb 2013 08:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r246654 - vendor-sys/illumos/dist/uts/common/dtrace vendor-sys/illumos/dist/uts/common/sys vendor/illumos/dist/cmd/stat/common X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 08:07:57 -0000 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 */