Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

scripts after zfsday

  • Loading branch information...
commit f53a4df3901a0a6f9ca9fe8bc6cdd11640108558 1 parent 1a24ef5
Brendan Gregg authored
Showing with 107 additions and 0 deletions.
  1. +36 −0 fs/ziocreatestacks.d
  2. +36 −0 fs/ziostacks.d
  3. +35 −0 system/iostacks.d
View
36 fs/ziocreatestacks.d
@@ -0,0 +1,36 @@
+#!/usr/sbin/dtrace -s
+/*
+ * ziocreatestacks.d Show kernel stacks for ZFS zio creation.
+ *
+ * SEE ALSO: ziostacks.d (preferred), iostacks.d
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at http://smartos.org/CDDL
+ *
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file.
+ *
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * Copyright (c) 2012 Joyent Inc., All rights reserved.
+ * Copyright (c) 2012 Brendan Gregg, All rights reserved.
+ */
+
+fbt::zio_create:entry
+/arg0 == NULL/
+{
+ @[probefunc, stack()] = count();
+}
View
36 fs/ziostacks.d
@@ -0,0 +1,36 @@
+#!/usr/sbin/dtrace -s
+/*
+ * ziostacks.d Show kernel stacks for ZFS zio_read/writes.
+ *
+ * SEE ALSO: iostacks.d, ziocreatestacks.d
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at http://smartos.org/CDDL
+ *
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file.
+ *
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * Copyright (c) 2012 Joyent Inc., All rights reserved.
+ * Copyright (c) 2012 Brendan Gregg, All rights reserved.
+ */
+
+fbt::zio_read:entry,
+fbt::zio_write:entry
+{
+ @[probefunc, stack()] = count();
+}
View
35 system/iostacks.d
@@ -0,0 +1,35 @@
+#!/usr/sbin/dtrace -s
+/*
+ * iostacks.d Show kernel stacks for io:::start (block-device interface).
+ *
+ * SEE ALSO: ziostacks.d (ZFS, preferred)
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at http://smartos.org/CDDL
+ *
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file.
+ *
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * Copyright (c) 2012 Joyent Inc., All rights reserved.
+ * Copyright (c) 2012 Brendan Gregg, All rights reserved.
+ */
+
+io:::start
+{
+ @[args[0]->b_flags & B_READ ? "read" : "write", stack()] = count();
+}
Please sign in to comment.
Something went wrong with that request. Please try again.