You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/08/15 12:59:20 UTC

svn commit: r431573 - in /incubator/harmony/enhanced/classlib/trunk/modules/instrument: ./ src/main/native/ src/main/native/instrument/ src/main/native/instrument/linux/ src/main/native/instrument/shared/ src/main/native/instrument/windows/

Author: pyang
Date: Tue Aug 15 03:59:19 2006
New Revision: 431573

URL: http://svn.apache.org/viewvc?rev=431573&view=rev
Log:
Patch applied for HARMONY-1181 ([classlib][instrument]native implementation for InstrumentationImpl)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/libhyinstrument.exp
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/makefile
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.h
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.def
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.rc
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/makefile
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/   (props changed)

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/instrument/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 15 03:59:19 2006
@@ -1 +1,3 @@
+
+*.obj
 bin

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 15 03:59:19 2006
@@ -0,0 +1,4 @@
+
+*.dll
+*.map
+*.pdb

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/libhyinstrument.exp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/libhyinstrument.exp?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/libhyinstrument.exp (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/libhyinstrument.exp Tue Aug 15 03:59:19 2006
@@ -0,0 +1,8 @@
+HYINSTRUMENT_0.1 {
+	global :
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getAllLoadedClasses;
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getInitiatedClasses;
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getObjectSize_1native;
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_redefineClasses_1native;
+	local : *;
+};

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/makefile?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/makefile (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/linux/makefile Tue Aug 15 03:59:19 2006
@@ -0,0 +1,33 @@
+# Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Makefile for module 'instrument'
+#
+
+include $(HY_HDK)/build/make/makefile.include
+
+CFLAGS += -fpic
+
+BUILDFILES = \
+	../shared/instrument.o 
+
+MDLLIBFILES = \
+	$(LIBPATH)libhycommon.a $(LIBPATH)libhyzip.a \
+	$(LIBPATH)libhypool.a $(LIBPATH)libhyfdlibm.a \
+	$(LIBPATH)libhythr.a $(LIBPATH)vmi.a
+
+DLLNAME = ../libhyinstrument.so
+
+include $(HY_HDK)/build/make/rules.mk

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c Tue Aug 15 03:59:19 2006
@@ -0,0 +1,191 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "instrument.h"
+#include "vmi.h"
+
+
+/*
+ * This file contains native methods implementation for org/apache/harmony/instrument/internal/InstrumentationImpl
+ */
+
+jobjectArray extract_elements(JNIEnv *env, jvmtiEnv *jvmti, jint count, const jclass* classes_ptr){
+	  jclass klass;
+	  jobjectArray classes;
+	  int index;
+	  jvmtiError err;
+		
+	  //get the class of "java.lang.Class" in java language
+	  klass= (*env)->FindClass(env, "java/lang/Class");
+	  if(NULL == klass){
+		return NULL;
+	  }
+	
+	  //initiate the object array to return, fill in all elements with the same value
+	  classes = (*env)->NewObjectArray(env, count, klass, NULL);
+	  if(NULL == classes){
+		  return NULL;
+	  }
+	
+	  //fill in the object array with right values
+	  for(index=0; index<count; index++){
+		  (*env)->SetObjectArrayElement(env, classes, index, classes_ptr[index]);
+	  }
+
+	  err = (*jvmti)->Deallocate(jvmti,(unsigned char *)classes_ptr);
+	  check_jvmti_error(env, err, "Cannot deallocate memory.");
+
+	  return classes;
+}
+
+/*
+ * Class:     Java_org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getAllLoadedClasses
+ * Signature: ()[Ljava/lang/Class;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getAllLoadedClasses
+  (JNIEnv* env, jobject objThis){
+	  jvmtiEnv* jvmti=gdata->jvmti;
+	  jint count=0;
+	  jclass* classes_ptr=NULL;
+      jobjectArray classes; //the object array to return
+	  
+	  jvmtiError err = (*jvmti)->GetLoadedClasses(jvmti, &count, &classes_ptr);
+	  check_jvmti_error(env, err, "Cannot get loaded classes.");
+
+	  classes = extract_elements(env, jvmti, count, classes_ptr);
+
+	  return classes;
+}
+
+
+/*
+ * Class:     Java_org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getInitiatedClasses
+ * Signature: (Ljava/lang/ClassLoader;)[Ljava/lang/Class;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getInitiatedClasses
+  (JNIEnv * env, jobject objThis, jobject loader){
+	  jvmtiEnv* jvmti=gdata->jvmti;
+	  jint count=0;
+	  jclass* classes_ptr=NULL;
+      jobjectArray classes; 
+
+	  jvmtiError err = (*jvmti)->GetClassLoaderClasses(jvmti, loader, &count, &classes_ptr);
+	  check_jvmti_error(env, err, "Cannot get loaded classes for this classloader.");
+
+	  classes = extract_elements(env, jvmti, count, classes_ptr);
+
+	  return classes;
+}
+
+/*
+ * Class:     Java_org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getObjectSize_native
+ * Signature: (Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getObjectSize_1native
+  (JNIEnv * env, jobject objThis, jobject objToSize){
+	  jvmtiEnv *jvmti=gdata->jvmti;
+	  jlong size=0l; 
+	  jvmtiError err=(*jvmti)->GetObjectSize(jvmti, objToSize, &size);
+	  check_jvmti_error(env, err, "Cannot get object size.");
+	  return size;
+}
+
+/*
+ * Class:     Java_org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    redefineClasses_native
+ * Signature: ([Ljava/lang/instrument/ClassDefinition;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_redefineClasses_1native
+  (JNIEnv * env, jobject objThis, jobjectArray javaClassDefArr){
+      PORT_ACCESS_FROM_ENV (env);
+	  jvmtiEnv* jvmti=gdata->jvmti;
+	  int err; 
+	  int index;
+	  jmethodID method_get_class;
+	  jmethodID method_get_data;
+	  jsize length;
+	  jvmtiClassDefinition *class_definitions;	  
+	  int i=0;
+
+	  //locate the java methods needed by class definition data extraction
+	  jclass class_ClassDefinition=(*env)->FindClass(env, "java/lang/instrument/ClassDefinition");
+	  if(NULL == class_ClassDefinition){
+		return JNI_ERR;
+	  }
+
+	  method_get_data=(*env)->GetMethodID(env, class_ClassDefinition, "getDefinitionClassFile", "()[B");
+	  if(NULL == method_get_data){
+		return JNI_ERR;
+	  }
+	  
+	  method_get_class=(*env)->GetMethodID(env, class_ClassDefinition, "getDefinitionClass", "()Ljava/lang/Class;");
+	  if(NULL == method_get_class){
+		return JNI_ERR;
+	  }
+
+	  //allocate memory for native jvmtiClassDefinition structs to hold class redefinition data
+	  length=(*env)->GetArrayLength(env, javaClassDefArr);
+	  class_definitions=(jvmtiClassDefinition*) hymem_allocate_memory(sizeof(jvmtiClassDefinition)*length);
+	  if(NULL == class_definitions){
+	  	return JNI_ERR;
+	  }
+	  
+	  //extract class definition data from java array into native array
+	  for(index=0; index<length; index++){
+		  int class_byte_count; 
+		  jobject obj_ClassDefinition=(*env)->GetObjectArrayElement(env, javaClassDefArr, index); 		  
+		  jbyteArray jclass_bytes;
+		  jboolean copy;
+		  jbyte* class_bytes;
+		  jclass klass=(jclass)(*env)->CallObjectMethod(env, obj_ClassDefinition, method_get_class);
+		  if (NULL == klass){
+		    hymem_free_memory(class_definitions);
+		  	return JNI_ERR;
+		  }
+		  jclass_bytes =(jbyteArray)(*env)->CallObjectMethod(env, obj_ClassDefinition, method_get_data);
+		  copy = JNI_TRUE;
+		  class_bytes = (*env)->GetByteArrayElements(env, jclass_bytes, &copy);
+		  if(NULL == class_bytes){
+			hymem_free_memory(class_definitions);
+			return JNI_ERR;
+		  }
+		  class_byte_count = (*env)->GetArrayLength(env, jclass_bytes);
+          if(copy == JNI_TRUE){
+		    (*env)->ReleaseByteArrayElements(env,jclass_bytes, class_bytes, JNI_ABORT);
+          }
+	  
+		  //construct a jvmtiClassDefinition element		  
+		  class_definitions[index].klass=klass;
+		  class_definitions[index].class_bytes=class_bytes;
+		  class_definitions[index].class_byte_count=class_byte_count;
+	  }
+
+	  //perform redefinition
+	  err=(*jvmti)->RedefineClasses(jvmti, length, class_definitions);
+	  //free memory
+	  hymem_free_memory(class_definitions);
+	  return err;
+}
+
+void check_jvmti_error(JNIEnv *env, jvmtiError error, const char *msg){
+	if(error != JVMTI_ERROR_NONE){
+		(*env)->FatalError(env,msg);
+	}
+	return;
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.h?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.h Tue Aug 15 03:59:19 2006
@@ -0,0 +1,113 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jvmti.h>
+#include <jni.h>
+/* Header for class org_apache_harmony_instrument_internal_InstrumentationImpl */
+
+#ifndef _Included_org_apache_harmony_instrument_internal_InstrumentationImpl
+#define _Included_org_apache_harmony_instrument_internal_InstrumentationImpl
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_SUCCEED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_SUCCEED 0L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_MUST_POSSESS_CAPABILITY
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_MUST_POSSESS_CAPABILITY 99L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_NULL_POINTER
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_NULL_POINTER 100L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNMODIFIABLE_CLASS
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNMODIFIABLE_CLASS 79L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_INVALID_CLASS
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_INVALID_CLASS 21L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_VERSION
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_VERSION 68L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_INVALID_CLASS_FORMAT
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_INVALID_CLASS_FORMAT 60L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION 61L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_FAILS_VERIFICATION
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_FAILS_VERIFICATION 62L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_NAMES_DONT_MATCH
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_NAMES_DONT_MATCH 69L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED 63L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED 64L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED 66L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED 67L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED 70L
+#undef org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED
+#define org_apache_harmony_instrument_internal_InstrumentationImpl_JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED 71L
+
+typedef struct{
+	jvmtiEnv *jvmti;
+	jobject *inst;
+	jclass *inst_class;
+	jmethodID *transform_method;
+	jmethodID *premain_method;
+} AgentData;
+
+typedef struct AgentList{
+	char *class_name;
+	char *option;
+	struct AgentList *next;
+}AgentList;
+
+AgentList list;
+AgentData *gdata;
+	
+/*
+ * Class:     org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    redefineClasses_native
+ * Signature: ([Ljava/lang/instrument/ClassDefinition;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_redefineClasses_1native
+  (JNIEnv *, jobject, jobjectArray);
+
+/*
+ * Class:     org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getAllLoadedClasses
+ * Signature: ()[Ljava/lang/Class;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getAllLoadedClasses
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getInitiatedClasses
+ * Signature: (Ljava/lang/ClassLoader;)[Ljava/lang/Class;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getInitiatedClasses
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_harmony_instrument_internal_InstrumentationImpl
+ * Method:    getObjectSize_native
+ * Signature: (Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getObjectSize_1native
+  (JNIEnv *, jobject, jobject);
+
+void check_jvmti_error(JNIEnv *, jvmtiError, const char *);
+#ifdef __cplusplus
+}
+#endif
+#endif
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 15 03:59:19 2006
@@ -0,0 +1,3 @@
+
+*.RES
+*.pdb

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.def
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.def?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.def (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.def Tue Aug 15 03:59:19 2006
@@ -0,0 +1,13 @@
+LIBRARY	HYINSTRUMENT
+
+SECTIONS
+	.data	READ WRITE
+	.text	EXECUTE READ
+
+EXPORTS
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getAllLoadedClasses	
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getInitiatedClasses
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_getObjectSize_1native
+	Java_org_apache_harmony_instrument_internal_InstrumentationImpl_redefineClasses_1native
+	
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.rc
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.rc?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.rc (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/hyinstrument.rc Tue Aug 15 03:59:19 2006
@@ -0,0 +1,47 @@
+;
+; Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+; 
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+; 
+;     http://www.apache.org/licenses/LICENSE-2.0
+; 
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+
+#include <windows.h>
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,1,0,0
+ PRODUCTVERSION 0,1,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x0L
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "The Apache Software Foundation.\0"
+            VALUE "FileDescription", "INSTRUMENT native code\0"
+            VALUE "FileVersion", "0.1\0"
+            VALUE "InternalName", "instrument\0"
+            VALUE "LegalCopyright", "(c) Copyright 2006 The Apache Software Foundation or its licensors, as applicable.\0"
+            VALUE "OriginalFilename", "hyinstrument.dll\0"
+            VALUE "ProductName", "Apache Harmony\0"
+            VALUE "ProductVersion", "0.1\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/makefile?rev=431573&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/makefile (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/windows/makefile Tue Aug 15 03:59:19 2006
@@ -0,0 +1,41 @@
+# Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Makefile for module 'instrument'
+#
+
+!include <$(HY_HDK)\build\make\defines.mak>
+
+LIBBASE=hyinstrument
+DLLNAME=..\$(LIBBASE).dll
+LIBNAME=$(LIBPATH)$(LIBBASE).lib
+HYCFLAGS = $(HYCFLAGS) /I$(SHAREDSUB) /I$(SHARED)common /I$(SHARED)fdlibm
+HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def
+
+BUILDFILES = \
+  $(SHAREDSUB)instrument.obj 
+  
+VIRTFILES = hyinstrument.res
+
+SYSLIBFILES = ws2_32.lib Iphlpapi.lib
+
+MDLLIBFILES = \
+  $(LIBPATH)hycommon.lib $(LIBPATH)hysig.lib $(LIBPATH)hyzip.lib $(LIBPATH)hyzlib.lib \
+  $(LIBPATH)hypool.lib $(LIBPATH)hyfdlibm.lib $(LIBPATH)hythr.lib $(LIBPATH)vmi.lib
+  
+DLLBASE=0x13200000
+COMMENT=/comment:"instrument component native code. (c) Copyright 2006 The Apache Software Foundation or its licensors, as applicable."
+
+!include <$(HY_HDK)\build\make\rules.mak>