/*
* 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
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/**
* Assert getAggregate() can explicitly specify the anonymous aggregation.
*/
public class TestGetAggregate {
"profile:::tick-50ms" +
"{" +
" @ = count();" +
" @a = count();" +
"}";
static void
throws DTraceException, InterruptedException
{
int n = 1;
}
// Wait up to a full second to obtain aggregate data. Without a
// time limit, we'll loop forever if no aggregation was
// successfully included.
do {
" was explicitly included but did not appear " +
"in the aggregate");
}
}
" was not explicitly included but appeared " +
"in the aggregate anyway");
}
}
throw new IllegalStateException("consumer exited");
}
}
static void
throws DTraceException, InterruptedException
{
long value;
int n = 1;
}
do {
n = 1;
do {
}
}
// last value should be about the same as first value
throw new IllegalStateException(
"been cleared but instead grew from " +
}
} else {
// last value should be about (INTERVALS * firstValue)
throw new IllegalStateException(
"accumulated a running total but " +
"instead went from " +
}
}
}
throw new IllegalStateException("consumer exited");
}
}
static void
{
public void consumerStarted(ConsumerEvent e) {
public void run() {
try {
includedStatus = 0;
} catch (Exception e) {
includedStatus = 1;
e.printStackTrace();
} finally {
}
}
}).start();
}
});
try {
} catch (Exception e) {
includedStatus = 1;
e.printStackTrace();
}
}
static void
{
public void consumerStarted(ConsumerEvent e) {
public void run() {
try {
clearedStatus = 0;
} catch (Exception e) {
clearedStatus = 1;
e.printStackTrace();
} finally {
}
}
}).start();
}
});
try {
} catch (Exception e) {
clearedStatus = 1;
e.printStackTrace();
}
}
public static void
{
do {
try {
} catch (InterruptedException e) {
e.printStackTrace();
}
} while (includedStatus == null);
do {
try {
} catch (InterruptedException e) {
e.printStackTrace();
}
} while (clearedStatus == null);
}
}
}