/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 1994, 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/tnf_writer.h>
#include <sys/tnf_probe.h>
#include "tnf_buf.h"
#include "tnf_types.h"
#include "tnf_trace.h"
/*
* New derived types for probes
*/
static char *kernel_schedule_slot_names[] = {
"cpuid", /* XXX */
0};
0};
sizeof (tnf_schedule_prototype_t));
/*
* Probe type record (metatag)
*/
0};
/*
* Write a kernel schedule record
* Can only be written in reusable data space.
*/
{
kthread_t *t;
t = curthread;
/* Cannot be called when writing into tag space */
TNF_ALLOC_REUSABLE); /* XXX see comment above */
/*
* Remember schedule record generation number so the distance
* in virtual space can be calculated from an event record
*/
/* Cannot have been written into tag space */
return ((tnf_record_p)buffer);
}
/*
* Array of addresses and derivatives
*/
{
if (!opaques)
return (TNF_NULL);
record_size = sizeof (*bufhdr);
while (*tmp++)
record_size += sizeof (*ref_p);
/* LINTED assignment of 64-bit integer to 32-bit integer */
/* LINTED pointer cast may result in improper alignment */
while (*tmp) {
tmp++;
ref_p++;
}
}
#ifdef __sparc
{
if (!opaques)
return (TNF_NULL);
record_size = sizeof (*bufhdr);
while (*tmp++)
record_size += sizeof (*ref_p);
/* LINTED assignment of 64-bit integer to 32-bit integer */
/* LINTED pointer cast may result in improper alignment */
while (*tmp) {
tmp++;
ref_p++;
}
}
#endif /* __sparc */
/*
* Tag initializer
*/
void
tnf_tag_trace_init(void)
{
}