003 File Manager
Current Path:
/usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars
usr
/
src
/
cddl
/
contrib
/
opensolaris
/
cmd
/
dtrace
/
test
/
tst
/
common
/
scalars
/
📁
..
📄
err.D_ARR_LOCAL.thisarray.d
(1.19 KB)
📄
err.D_DECL_CLASS.selfthis.d
(1.1 KB)
📄
err.D_DECL_CLASS.thisself.d
(1.08 KB)
📄
err.D_DECL_IDRED.errval.d
(1.11 KB)
📄
err.D_OP_INCOMPAT.dec.err.d
(1.09 KB)
📄
err.D_OP_INCOMPAT.dupgtype.d
(1.11 KB)
📄
err.D_OP_INCOMPAT.dupltype.d
(1.13 KB)
📄
err.D_OP_INCOMPAT.dupttype.d
(1.19 KB)
📄
err.D_SYNTAX.declare.d
(1.1 KB)
📄
err.bigglobal.d
(587 B)
📄
err.biglocal.d
(598 B)
📄
tst.16kglobal.d
(641 B)
📄
tst.16klocal.d
(643 B)
📄
tst.basicvar.d
(1.28 KB)
📄
tst.basicvar.d.out
(23 B)
📄
tst.localvar.d
(1.21 KB)
📄
tst.misc.d
(1.52 KB)
📄
tst.self.d
(1.11 KB)
📄
tst.selfarray.d
(1.24 KB)
📄
tst.selfarray2.d
(1.47 KB)
📄
tst.selfthis.d
(1.16 KB)
📄
tst.this.d
(1.08 KB)
📄
tst.thisself.d
(1.16 KB)
Editing: tst.selfarray2.d
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * 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 and include the License file at usr/src/OPENSOLARIS.LICENSE. * 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 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" #pragma D option quiet #pragma D option destructive #pragma D option dynvarsize=1m struct bar { pid_t pid; struct thread *curthread; }; self struct bar foo[int]; syscall:::entry /!self->foo[0].pid/ { self->foo[0].pid = pid; self->foo[0].curthread = curthread; } syscall:::entry /self->foo[0].pid != pid/ { printf("expected %d, found %d (found curthread %p, curthread is %p)\n", pid, self->foo[0].pid, self->foo[0].curthread, curthread); exit(1); } tick-100hz { system("date > /dev/null") } tick-1sec /i++ == 10/ { exit(0); }
Upload File
Create Folder