8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / dtrace / test / tst / common / pragma / tst.temporal3.d
blobb4c0e557bea1094070453bbdeb6a1d6a14a964f3
1 /*
2 * CDDL HEADER START
4 * This file and its contents are supplied under the terms of the
5 * Common Development and Distribution License ("CDDL"), version 1.0.
6 * You may only use this file in accordance with the terms of version
7 * 1.0 of the CDDL.
9 * A full copy of the text of the CDDL should have accompanied this
10 * source. A copy of the CDDL is also available via the Internet at
11 * http://www.illumos.org/license/CDDL.
13 * CDDL HEADER END
17 * Copyright (c) 2012 by Delphix. All rights reserved.
21 * This test excercises the "remnant" handling of the temporal option.
22 * At the end of one pass of retrieving and printing data from all CPUs,
23 * some unprocessed data will remain, because its timestamp is after the
24 * time covered by all CPUs' buffers. This unprocessed data is
25 * rearranged in a more space-efficient manner. If this is done
26 * incorrectly, an alignment error may occur. To test this, we use a
27 * high-frequency probe so that data will be recorded in subsequent
28 * CPU's buffers after the first CPU's buffer is obtained. The
29 * combination of data traced here (a 8-byte value and a 4-byte value)
30 * is effective to cause alignment problems with an incorrect
31 * implementation.
33 * This test needs to be run on a multi-CPU system to be effective.
36 #pragma D option quiet
37 #pragma D option temporal
39 profile-4997
41 printf("%u %u", 1ULL, 2);
44 tick-1
45 /i++ == 10/
47 exit(0);