PrintaRecord.java revision 4ae67516a1d5dc4a5dbc761762bad5b596647388
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER START
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * The contents of this file are subject to the terms of the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Common Development and Distribution License (the "License").
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You may not use this file except in compliance with the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * See the License for the specific language governing permissions
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * and limitations under the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * When distributing Covered Code, include this CDDL HEADER in each
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * If applicable, add the following below this CDDL HEADER, with the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * fields enclosed by brackets "[]" replaced with your own identifying
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * information: Portions Copyright [yyyy] [name of copyright owner]
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER END
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Use is subject to license terms.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * ident "%Z%%M% %I% %E% SMI"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * A record generated by the DTrace {@code printa()} action. Lists the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * aggregations passed to {@code printa()} and records the formatted
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * output associated with each {@link Tuple}. If multiple aggregations
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * were passed to the {@code printa()} action that generated this
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * record, then the DTrace library tabulates the output, using a default
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * format if no format string was specified. By default, the output
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * string associated with a given {@code Tuple} includes a value from
e37190e5b4531a897e4191a30b8f41678b582e25michen * each aggregation, or zero wherever an aggregation has no value
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * associated with that {@code Tuple}. For example, the D statements
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * <pre><code>
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * @a[123] = sum(1);
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * @b[456] = sum(2);
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * printa(@a, @b, @c);
e37190e5b4531a897e4191a30b8f41678b582e25michen * </code></pre>
e37190e5b4531a897e4191a30b8f41678b582e25michen * produce output for the tuples "123" and "456" similar to the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * following:
e37190e5b4531a897e4191a30b8f41678b582e25michen * <pre><code>
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * 123 1 0 0
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * 456 0 2 0
e37190e5b4531a897e4191a30b8f41678b582e25michen * </code></pre>
e37190e5b4531a897e4191a30b8f41678b582e25michen * The first column after the tuple contains values from {@code @a},
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * the next column contains values from {@code @b}, and the last
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * column contains zeros because {@code @c} has neither a value
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * associated with "123" nor a value associated with "456".
* Immutable. Supports persistence using {@link java.beans.XMLEncoder}.
} catch (IntrospectionException e) {
private final long snaptime;
private transient boolean formatted;
validate();
validate();
validate()
Aggregation a;
if (a == null) {
throw new NullPointerException(
return snaptime;
private Aggregation
return null;
return null;
public Aggregation
public String
return null;
public String
return output;
} catch (IllegalArgumentException e) {
s.defaultWriteObject();
s.defaultReadObject();
validate();
} catch (Exception e) {
e.getMessage());
x.initCause(e);
public String
toString()