/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <dtrace_jni.h>
/*
* This file creates instances of the Java class
* org.opensolaris.os.dtrace.InterfaceAttributes.
*/
static const char *
{
const char *name;
switch (stability) {
name = "INTERNAL";
break;
case DTRACE_STABILITY_PRIVATE:
name = "PRIVATE";
break;
name = "OBSOLETE";
break;
name = "EXTERNAL";
break;
name = "UNSTABLE";
break;
name = "EVOLVING";
break;
case DTRACE_STABILITY_STABLE:
name = "STABLE";
break;
name = "STANDARD";
break;
default:
}
return (name);
}
static const char *
{
const char *name;
switch (class) {
case DTRACE_CLASS_UNKNOWN:
name = "UNKNOWN";
break;
case DTRACE_CLASS_CPU:
name = "CPU";
break;
case DTRACE_CLASS_PLATFORM:
name = "PLATFORM";
break;
case DTRACE_CLASS_GROUP:
name = "GROUP";
break;
case DTRACE_CLASS_ISA:
name = "ISA";
break;
case DTRACE_CLASS_COMMON:
name = "COMMON";
break;
default:
}
return (name);
}
{
const char *name;
return (NULL);
}
/* name stability */
if (!name) {
"unexpected name stability value: %d",
return (NULL);
}
return (NULL);
}
return (NULL);
}
/* data stability */
if (!name) {
"unexpected data stability value: %d",
return (NULL);
}
return (NULL);
}
return (NULL);
}
/* dependency class */
if (!name) {
"unexpected dependency class value: %d",
attr->dtat_class);
return (NULL);
}
return (NULL);
}
return (NULL);
}
return (jattr);
}