e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * CDDL HEADER START
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * This file and its contents are supplied under the terms of the
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Common Development and Distribution License ("CDDL"), version 1.0.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * You may only use this file in accordance with the terms of version
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * 1.0 of the CDDL.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * A full copy of the text of the CDDL should have accompanied this
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * source. A copy of the CDDL is also available via the Internet at
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * http://www.illumos.org/license/CDDL.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * CDDL HEADER END
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Copyright (c) 2012 by Delphix. All rights reserved.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * This test excercises the "remnant" handling of the temporal option.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * At the end of one pass of retrieving and printing data from all CPUs,
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * some unprocessed data will remain, because its timestamp is after the
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * time covered by all CPUs' buffers. This unprocessed data is
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * rearranged in a more space-efficient manner. If this is done
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * incorrectly, an alignment error may occur. To test this, we use a
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * high-frequency probe so that data will be recorded in subsequent
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * CPU's buffers after the first CPU's buffer is obtained. The
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * combination of data traced here (a 8-byte value and a 4-byte value)
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * is effective to cause alignment problems with an incorrect
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * implementation.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * This test needs to be run on a multi-CPU system to be effective.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal#pragma D option quiet
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal#pragma D option temporal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhalprofile-4997
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal{
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal printf("%u %u", 1ULL, 2);
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal}
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhaltick-1
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/i++ == 10/
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal{
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal exit(0);
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal}