Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 215437
Collapse All | Expand All

(-)src-native/src/Martini/Infrastructure/CGAdaptor/CGAdaptor.cpp (-6 / +19 lines)
Lines 195-201 Link Here
195
        res = DoCallGraphInstrumentation(pJavaClass, pCGContext->classInfo, m_bJVMInitDone);
195
        res = DoCallGraphInstrumentation(pJavaClass, pCGContext->classInfo, m_bJVMInitDone);
196
        if (MRTE_RESULT_OK == res)
196
        if (MRTE_RESULT_OK == res)
197
        {
197
        {
198
            // write the instrumented class file to pInstrumentedClass
198
            // Write the instrumented class file to pInstrumentedClass
199
            SBuffer buffer;
199
            SBuffer buffer;
200
            res = pJavaClass->WriteBack(&buffer, funcAllocator);
200
            res = pJavaClass->WriteBack(&buffer, funcAllocator);
201
            if (MRTE_RESULT_OK == res)
201
            if (MRTE_RESULT_OK == res)
Lines 292-301 Link Here
292
        pJavaClass->RegisterRecorderCallback(wzCallbackClassName, 
292
        pJavaClass->RegisterRecorderCallback(wzCallbackClassName, 
293
            wzIsJVMInitName, wzIsJVMInitSig);
293
            wzIsJVMInitName, wzIsJVMInitSig);
294
294
295
    TResult res;
295
    TResult res = MRTE_RESULT_OK;
296
    IJavaMethod *pMethod;
296
    IJavaMethod *pMethod;
297
    TJavaMethodIterator *pMethIter = NULL;
297
    TJavaMethodIterator *pMethIter = NULL;
298
    SJavaMethodInfo *pJavaMethodInfo;
298
    SJavaMethodInfo *pJavaMethodInfo;
299
    size_t instrMethodCount = 0;
299
300
300
    if (ILLEGAL_CP_ENTRY != cpEntryCallback
301
    if (ILLEGAL_CP_ENTRY != cpEntryCallback
301
        && ILLEGAL_CP_ENTRY != cpLeaveCallback
302
        && ILLEGAL_CP_ENTRY != cpLeaveCallback
Lines 336-350 Link Here
336
                        cpEntryCallback, cpLeaveCallback, cpIsJVMInit, bJVMInitDone);
337
                        cpEntryCallback, cpLeaveCallback, cpIsJVMInit, bJVMInitDone);
337
                    if (MRTE_RESULT_OK != res)
338
                    if (MRTE_RESULT_OK != res)
338
                    {
339
                    {
339
                        //TODO: write an error to the Martini logger
340
                        DeallocateJavaMethodInfo(pJavaMethodInfo);
340
                        DeallocateJavaMethodInfo(pJavaMethodInfo);
341
                        delete pJavaMethodInfo;
341
                        delete pJavaMethodInfo;
342
                        LOG_INFORMATIVE4("CGAdaptor", 0, false, 
343
                            "Error instrumenting '%s.%s(%s)'. Reason: %x", 
344
                            classInfo.szClassName, pMethodInstrumentationInfo->szName, 
345
                            pMethodInstrumentationInfo->szSignature, res);
342
                        break;
346
                        break;
343
                    }
347
                    }
348
                    instrMethodCount++;
344
                    LOG_INFORMATIVE3("CGAdaptor", 5, false, "Instrumented: %s.%s(%s)", 
349
                    LOG_INFORMATIVE3("CGAdaptor", 5, false, "Instrumented: %s.%s(%s)", 
345
                        classInfo.szClassName, pMethodInstrumentationInfo->szName, 
350
                        classInfo.szClassName, pMethodInstrumentationInfo->szName, 
346
                        pMethodInstrumentationInfo->szSignature);
351
                        pMethodInstrumentationInfo->szSignature);
347
                } // if (method passed selelctivity criterion)
352
                } // if (method passed selectivity criterion)
348
            } 
353
            } 
349
            // deallocate the method information
354
            // deallocate the method information
350
            DeallocateJavaMethodInfo(pJavaMethodInfo);
355
            DeallocateJavaMethodInfo(pJavaMethodInfo);
Lines 355-365 Link Here
355
    else
360
    else
356
    {
361
    {
357
        // unable to add recorder callbacks to the constant pool
362
        // unable to add recorder callbacks to the constant pool
358
        //TODO: write an error to the Martini logger
363
        LOG_INFORMATIVE1("CGAdaptor", 0, false, "Unable to add recorder callbacks to class %s", 
364
            classInfo.szClassName);
359
        res = MRTE_ERROR_FAIL;
365
        res = MRTE_ERROR_FAIL;
360
    }
366
    }
361
367
362
    // clean-up
368
    // Clean-up
363
    CWideStringUtils::FreeWideString(wzCallbackClassName);
369
    CWideStringUtils::FreeWideString(wzCallbackClassName);
364
    CWideStringUtils::FreeWideString(wzMethodEntryCallbackName);
370
    CWideStringUtils::FreeWideString(wzMethodEntryCallbackName);
365
    CWideStringUtils::FreeWideString(wzMethodEntryCallbackSig);
371
    CWideStringUtils::FreeWideString(wzMethodEntryCallbackSig);
Lines 368-373 Link Here
368
    CWideStringUtils::FreeWideString(wzIsJVMInitName);    
374
    CWideStringUtils::FreeWideString(wzIsJVMInitName);    
369
    CWideStringUtils::FreeWideString(wzIsJVMInitSig);    
375
    CWideStringUtils::FreeWideString(wzIsJVMInitSig);    
370
376
377
    // If no methods were instrumented, modify the return code to indicate this
378
    if (MRTE_SUCCEEDED(res) && instrMethodCount == 0)
379
    {
380
        LOG_INFORMATIVE1("CGAdaptor", 3, false, "Class %s was not instrumented because all its methods were excluded", 
381
            classInfo.szClassName);
382
        res = MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED;
383
    }
371
    return res;
384
    return res;
372
}
385
}
373
386
(-)src-native/src/Martini/Infrastructure/JPI/JVMTIInterface.cpp (-4 / +19 lines)
Lines 2686-2692 Link Here
2686
    err = m_pJvmtiEnv->AddCapabilities(&cap);
2686
    err = m_pJvmtiEnv->AddCapabilities(&cap);
2687
    if (JVMTI_ERROR_NONE != err)
2687
    if (JVMTI_ERROR_NONE != err)
2688
    {
2688
    {
2689
        return MRTE_ERROR_NOT_SUPPORTED;
2689
        // Try again without can_redefine_any_class (this capability is desired but not required)
2690
        cap.can_redefine_any_class = 0;
2691
        err = m_pJvmtiEnv->AddCapabilities(&cap);
2692
        if (JVMTI_ERROR_NONE != err)
2693
        {
2694
            MARTINI_INFORMATIVE("CJVMTIInterface", 0, false, 
2695
                "[CTIEnableDisableBciGeneratedEventsCapability] Required JVMTI capability 'can_redefine_classes' is "
2696
                "not supported by the JVM");
2697
            return MRTE_ERROR_NOT_SUPPORTED;
2698
        }
2699
        else
2700
        {
2701
            MARTINI_INFORMATIVE("CJVMTIInterface", 0, false, 
2702
                "[CTIEnableDisableBciGeneratedEventsCapability] JVM does not support the JVMTI capability "
2703
                "'can_redefine_any_class'. This may cause problems with attach/detach operations");
2704
        }
2690
    }
2705
    }
2691
    m_bEnabled = true;
2706
    m_bEnabled = true;
2692
    return MRTE_RESULT_OK;    
2707
    return MRTE_RESULT_OK;    
Lines 2702-2709 Link Here
2702
    {
2717
    {
2703
        return false;
2718
        return false;
2704
    }
2719
    }
2705
    return (cap.can_redefine_any_class 
2720
    return (cap.can_redefine_classes
2706
        && cap.can_redefine_classes
2707
        && cap.can_suspend);
2721
        && cap.can_suspend);
2708
}
2722
}
2709
2723
Lines 2711-2717 Link Here
2711
{
2725
{
2712
    jvmtiCapabilities cap;
2726
    jvmtiCapabilities cap;
2713
    memset(&cap, 0, sizeof(jvmtiCapabilities));
2727
    memset(&cap, 0, sizeof(jvmtiCapabilities));
2714
    cap.can_redefine_any_class = 1;
2728
    cap.can_redefine_any_class = 1;     // Although the environment may not posses this capability, 
2729
                                        // relinquishing it is OK according to the JVMTI specification
2715
    cap.can_redefine_classes = 1;
2730
    cap.can_redefine_classes = 1;
2716
    cap.can_suspend = 1;
2731
    cap.can_suspend = 1;
2717
    jvmtiError err;
2732
    jvmtiError err;
(-)src-native/src/Martini/Infrastructure/JPI/ObjectInfoManager.cpp (-3 lines)
Lines 85-93 Link Here
85
    }
85
    }
86
    *pNewObjectId = m_objIdAllocator.AllocateId();
86
    *pNewObjectId = m_objIdAllocator.AllocateId();
87
    GetTagInfo(tag)->jobjectInfo.objectId = *pNewObjectId;
87
    GetTagInfo(tag)->jobjectInfo.objectId = *pNewObjectId;
88
	MARTINI_INFORMATIVE1("CObjectInfoManager", 5, false, 
89
		"[NewObject] allocated new object id %u", (U32)*pNewObjectId);
90
91
    return MRTE_RESULT_OK;
88
    return MRTE_RESULT_OK;
92
}
89
}
93
90
(-)src-native/src/Martini/Infrastructure/JPI/DataManager.h (-2 / +2 lines)
Lines 213-218 Link Here
213
213
214
        TResult SetClassInstrumentationStatus(const MPI::TId classId, bool bEventsEnabled);
214
        TResult SetClassInstrumentationStatus(const MPI::TId classId, bool bEventsEnabled);
215
215
216
        bool AreEventsEnabledForClass(MPI::TId classId);
217
216
        TResult NewClass(const MPI::TId classId, 
218
        TResult NewClass(const MPI::TId classId, 
217
                         const char *szNativeClassName,
219
                         const char *szNativeClassName,
218
                         const MPI::TId loaderObjectId,
220
                         const MPI::TId loaderObjectId,
Lines 278-285 Link Here
278
        
280
        
279
        TResult GetThreadCurrentMonitor(MPI::TId *pMonId, jthread thread);
281
        TResult GetThreadCurrentMonitor(MPI::TId *pMonId, jthread thread);
280
282
281
        bool AreEventsEnabledForClass(MPI::TId classId);
282
283
        void MakeUniqueClassName(RTUtil::MCString& strUniqueName,
283
        void MakeUniqueClassName(RTUtil::MCString& strUniqueName,
284
                                 const RTUtil::MCString& strClassName,
284
                                 const RTUtil::MCString& strClassName,
285
                                 MPI::TId classLoaderId);
285
                                 MPI::TId classLoaderId);
(-)src-native/src/Martini/Infrastructure/JPI/JavaInstrumentorManager.h (-6 / +6 lines)
Lines 266-277 Link Here
266
266
267
        TResult ApplyInstrForLoadedClasses(MPI::EEventGroup group, bool enabled);
267
        TResult ApplyInstrForLoadedClasses(MPI::EEventGroup group, bool enabled);
268
268
269
        TResult ApplyInstrForClass(Infrastructure::SClassFile *pInstrumentedClass,
270
                                   jclass *pClassJniGlobalRef,
271
                                   MPI::TId classId, 
272
                                   MPI::EEventGroup group, 
273
                                   bool bEnabled);
274
275
        void InstrumentationLock()
269
        void InstrumentationLock()
276
        {
270
        {
277
            m_csInstrumentation->Enter();
271
            m_csInstrumentation->Enter();
Lines 312-317 Link Here
312
        
306
        
313
    private:
307
    private:
314
308
309
        TResult ApplyInstrForClass(Infrastructure::SClassFile *pInstrumentedClass,
310
                                   jclass *pClassJniGlobalRef,
311
                                   MPI::TId classId, 
312
                                   MPI::EEventGroup group, 
313
                                   bool bEnabled);
314
315
        TResult ApplyInstrForLoadedClassesImpl(MPI::EEventGroup group, bool enabled);
315
        TResult ApplyInstrForLoadedClassesImpl(MPI::EEventGroup group, bool enabled);
316
316
317
        TResult SetInstrumentationInfo(MPI::IEventObserver& even);
317
        TResult SetInstrumentationInfo(MPI::IEventObserver& even);
(-)src-native/src/Martini/Infrastructure/JPI/DataManager.cpp (+8 lines)
Lines 1696-1701 Link Here
1696
                        m_pJavaInstrumentorManager->RedefineMultipleClasses(
1696
                        m_pJavaInstrumentorManager->RedefineMultipleClasses(
1697
                            vecClassesToRedefine, false /* isBlocking */);
1697
                            vecClassesToRedefine, false /* isBlocking */);
1698
                    }
1698
                    }
1699
                    else if (MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED == iRes
1700
                        || MRTE_ERROR_UNABLE_TO_INSTRUMENT == iRes)
1701
                    {
1702
                        MARTINI_INFORMATIVE1("CDataManager", 0, false, 
1703
                            "Class '%s' has wrong instrumentation, but will not be redefined due to user-defined "
1704
                            "filters or an internal reason", 
1705
                            pClassInfo->szNativeName.Get());
1706
                    }
1699
                    else
1707
                    else
1700
                    {
1708
                    {
1701
                        // Error instrumenting class. This is a fatal error.
1709
                        // Error instrumenting class. This is a fatal error.
(-)src-native/src/Martini/Infrastructure/JPI/JavaInstrumentorManager.cpp (-25 / +65 lines)
Lines 1064-1098 Link Here
1064
    }
1064
    }
1065
1065
1066
    SClassFile *pClassWithBasicInstr = new SClassFile();
1066
    SClassFile *pClassWithBasicInstr = new SClassFile();
1067
    SClassFile classToReturnToJVM;
1068
    memset(&classToReturnToJVM, 0, sizeof(SClassFile));
1067
    
1069
    
1068
    // Apply basic instrumentation to the class file. The memory for the resulting class file
1070
    // Apply basic instrumentation to the class file. The memory for the resulting class file
1069
    // is allocated from the internal JPI heap (using malloc)
1071
    // is allocated from the internal JPI heap (using malloc)
1070
    iRetVal = m_pAdaptor->ModifyClass(classId, classToInstrument, LocalMemAlloc, 
1072
    TResult modifyClassRes = m_pAdaptor->ModifyClass(classId, classToInstrument, LocalMemAlloc, 
1071
        pClassWithBasicInstr);
1073
        pClassWithBasicInstr);
1072
1074
1073
    InstrumentationLock();
1075
    InstrumentationLock();
1074
1076
1075
    if (MRTE_SUCCEEDED(iRetVal))
1077
    if (MRTE_SUCCEEDED(modifyClassRes))
1076
    {
1078
    {
1077
        // Store the instrumented class in the Data Manager. This image will be used
1079
        // Store the instrumented class in the Data Manager. This image will be used
1078
        // for redefining the class in the future (if needed)
1080
        // for redefining the class in the future (if needed)
1079
        iRetVal = m_pDataManager->SetClassFileBuffer(classId, pClassWithBasicInstr);
1081
        iRetVal = m_pDataManager->SetClassFileBuffer(classId, pClassWithBasicInstr);
1082
        if (MRTE_SUCCEEDED(iRetVal))
1083
        {
1084
            // If the class was instrumented, check whether method-level BCI is also needed
1085
            // and prepare a class buffer for the JVM
1086
            TResult modifyByteCodesRes;
1087
            if (m_bInstrGeneratedEventsEnabled)
1088
            {
1089
                modifyByteCodesRes = m_pAdaptor->ModifyByteCodes(classId, *pClassWithBasicInstr, 
1090
                    pJVMEvent->u.classLoadHook.pfnAllocate, &classToReturnToJVM);
1091
            }
1092
            else
1093
            {
1094
                // Method-level BCI is not needed (events are not enabled)
1095
                modifyByteCodesRes = MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED;
1096
            }
1080
1097
1081
        // If the class was instrumented, check whether method-level BCI is also needed
1098
            // If method-level BCI failed or not needed, use the "basic instrumentation" class image
1082
        // and prepare a class buffer for the JVM
1099
            if (MRTE_FAILED(modifyByteCodesRes))
1083
        SClassFile classToReturnToJVM;
1100
            {
1101
                iRetVal = CopyClassFile(&classToReturnToJVM, *pClassWithBasicInstr, 
1102
                    pJVMEvent->u.classLoadHook.pfnAllocate);
1103
                MARTINI_INFORMATIVE2("CJavaInstrumentorManager", 5, false, 
1104
                    "Using basic instrumentation for class %u '%s'", 
1105
                    (U32)classId, pJVMEvent->u.classLoadHook.szClassName);
1106
            }
1107
            else
1108
            {
1109
                MARTINI_INFORMATIVE2("CJavaInstrumentorManager", 5, false, 
1110
                    "Using metod-level instrumentation for class %u '%s'", 
1111
                    (U32)classId, pJVMEvent->u.classLoadHook.szClassName);
1084
1112
1085
        if (m_bInstrGeneratedEventsEnabled)
1113
            }
1086
        {
1087
            iRetVal = m_pAdaptor->ModifyByteCodes(classId, *pClassWithBasicInstr, 
1088
                pJVMEvent->u.classLoadHook.pfnAllocate, &classToReturnToJVM);
1089
        }
1114
        }
1090
        else
1115
        else
1091
        {
1116
        {
1092
            iRetVal = CopyClassFile(&classToReturnToJVM, *pClassWithBasicInstr, 
1117
            MARTINI_INFORMATIVE2("CJavaInstrumentorManager", 0, false, 
1093
                pJVMEvent->u.classLoadHook.pfnAllocate);
1118
                "Unable to store basic image of class '%s' in Data Manager. Class id %u is invalid", 
1119
                pJVMEvent->u.classLoadHook.szClassName, (U32)classId);
1094
        }
1120
        }
1095
1121
1122
1096
#ifdef DUMP_CLASS
1123
#ifdef DUMP_CLASS
1097
        char szDumpFileName[1000];
1124
        char szDumpFileName[1000];
1098
        sprintf(szDumpFileName, "%s@%p", pJVMEvent->u.classLoadHook.szClassName, 
1125
        sprintf(szDumpFileName, "%s@%p", pJVMEvent->u.classLoadHook.szClassName, 
Lines 1113-1118 Link Here
1113
            // Return the instrumented class file to the JVM
1140
            // Return the instrumented class file to the JVM
1114
            *pJVMEvent->u.classLoadHook.ppucNewClassData = classToReturnToJVM.pClassFile;
1141
            *pJVMEvent->u.classLoadHook.ppucNewClassData = classToReturnToJVM.pClassFile;
1115
            *pJVMEvent->u.classLoadHook.pNewClassDataLen = classToReturnToJVM.uiSize;
1142
            *pJVMEvent->u.classLoadHook.pNewClassDataLen = classToReturnToJVM.uiSize;
1143
            MARTINI_INFORMATIVE2("CJavaInstrumentorManager", 5, false, 
1144
                "Instrumented class %u '%s' will be returned to JVM", 
1145
                (U32)classId, pJVMEvent->u.classLoadHook.szClassName);
1116
        }
1146
        }
1117
        else
1147
        else
1118
        {
1148
        {
Lines 1120-1128 Link Here
1120
            SetClassFileNotInstrumented(pJVMEvent);
1150
            SetClassFileNotInstrumented(pJVMEvent);
1121
            if (MRTE_ERROR_FAIL == iRetVal)
1151
            if (MRTE_ERROR_FAIL == iRetVal)
1122
            {
1152
            {
1123
                MARTINI_INFORMATIVE1("CJavaInstrumentorManager", 0, false, 
1153
                MARTINI_INFORMATIVE2("CJavaInstrumentorManager", 0, false, 
1124
                    "Class '%s' was not instrumneted due to instrumentation errors", 
1154
                    "Class %u '%s' was not instrumneted due to instrumentation errors", 
1125
                    pJVMEvent->u.classLoadHook.szClassName);
1155
                    (U32)classId, pJVMEvent->u.classLoadHook.szClassName);
1126
            }
1156
            }
1127
        }
1157
        }
1128
    }
1158
    }
Lines 1207-1213 Link Here
1207
        return iRes;
1237
        return iRes;
1208
    }
1238
    }
1209
1239
1210
    // Instrument classes
1240
    // Iterate the list of classes, instrument and queue for redefinition only classes
1241
    // that have valid JNI reference and basic instrumentation image
1242
    
1211
    TJvmtiClassDefVector vecClassesToRedefine;
1243
    TJvmtiClassDefVector vecClassesToRedefine;
1212
    vecClassesToRedefine.Reserve(pClassIdList->Count());
1244
    vecClassesToRedefine.Reserve(pClassIdList->Count());
1213
1245
Lines 1231-1237 Link Here
1231
                    MARTINI_INFORMATIVE1("CJavaInstrumentorManager", 5, false, 
1263
                    MARTINI_INFORMATIVE1("CJavaInstrumentorManager", 5, false, 
1232
                        "Class '%s' added to redefinition list", 
1264
                        "Class '%s' added to redefinition list", 
1233
                        strNativeClassName.Get());
1265
                        strNativeClassName.Get());
1234
1266
                }
1267
                else if (MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED == iRes
1268
                    || MRTE_ERROR_UNABLE_TO_INSTRUMENT == iRes)
1269
                {
1270
                    MARTINI_INFORMATIVE1("CJavaInstrumentorManager", 5, false, 
1271
                        "Class '%s' will not be redefined due to user-defined filters or an internal reason", 
1272
                        strNativeClassName.Get());
1235
                }
1273
                }
1236
                else
1274
                else
1237
                {
1275
                {
Lines 1316-1321 Link Here
1316
    //       adaptor is always used, regardless of the specified group.
1354
    //       adaptor is always used, regardless of the specified group.
1317
    //       This is OK since this version supports only one adaptor (either Heap or
1355
    //       This is OK since this version supports only one adaptor (either Heap or
1318
    //       Call Graph)
1356
    //       Call Graph)
1357
1358
    if (m_pDataManager->AreEventsEnabledForClass(classId) == bEnabled)
1359
    {
1360
        // No need to instrument this class as its events status matches the desired status
1361
1362
        // NOTE: this implementation assumes that different filters cannot be applied without 
1363
        //       disabling events and then enabling them again.
1364
        return MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED;
1365
    }
1366
1319
    SClassFile classWithBasicInstr;
1367
    SClassFile classWithBasicInstr;
1320
    MCString strNativeClassName;
1368
    MCString strNativeClassName;
1321
    TMemoryAllocatorFunc funcAllocator = m_pJVM->GetMemoryAllocator();
1369
    TMemoryAllocatorFunc funcAllocator = m_pJVM->GetMemoryAllocator();
Lines 1329-1335 Link Here
1329
    }
1377
    }
1330
    if (bEnabled)
1378
    if (bEnabled)
1331
    {
1379
    {
1332
        // Apply call-graph instrumentation to the class
1380
        // Apply method-level instrumentation to the class
1333
        iRes = m_pAdaptor->ModifyByteCodes(classId, classWithBasicInstr, funcAllocator,
1381
        iRes = m_pAdaptor->ModifyByteCodes(classId, classWithBasicInstr, funcAllocator,
1334
            pInstrumentedClass);
1382
            pInstrumentedClass);
1335
    }
1383
    }
Lines 1478-1490 Link Here
1478
        assert(classDef.class_bytes);
1526
        assert(classDef.class_bytes);
1479
        pClassRedefQueue->Push(classDef);
1527
        pClassRedefQueue->Push(classDef);
1480
    }
1528
    }
1481
    else
1482
    {
1483
        if (MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED != iRes
1484
            && MRTE_ERROR_UNABLE_TO_INSTRUMENT != iRes)
1485
        {
1486
            iRes = MRTE_ERROR_FAIL;
1487
        }
1488
    }
1489
    return iRes;
1529
    return iRes;
1490
}
1530
}
(-)src-native/src/Martini/Infrastructure/Include/InstrumentationAdaptor.h (-1 / +2 lines)
Lines 222-228 Link Here
222
         *
222
         *
223
         * @retval MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED   The class was not instrumented
223
         * @retval MRTE_ERROR_INSTRUMENTATION_NOT_NEEDED   The class was not instrumented
224
         *                                                 at all. This value is returned
224
         *                                                 at all. This value is returned
225
         *                                                 for interface classes.
225
         *                                                 for interface classes or when all 
226
         *                                                 methods were filtered-out
226
         *
227
         *
227
         * @retval MRTE_ERROR_UNABLE_TO_INSTRUMENT    The class cannot be instrumented.
228
         * @retval MRTE_ERROR_UNABLE_TO_INSTRUMENT    The class cannot be instrumented.
228
         *                                            This value is returned for classes
229
         *                                            This value is returned for classes
(-)src-native/src/Martini/Infrastructure/HeapAdaptor/HeapAdaptor.cpp (-1 / +2 lines)
Lines 440-445 Link Here
440
        "sun/reflect/Generated",                    // Classes generated during runtime to 
440
        "sun/reflect/Generated",                    // Classes generated during runtime to 
441
                                                    // support reflection
441
                                                    // support reflection
442
        "com/Intel/VTune/VTuneAPI",                 // VTune API Proxy class
442
        "com/Intel/VTune/VTuneAPI",                 // VTune API Proxy class
443
        "java/lang/",                               // Patch to IBM redefinition problem
443
        "org/eclipse/hyades/collection/profiler"    // TPTP Profiler API Proxy class
444
        "org/eclipse/hyades/collection/profiler"    // TPTP Profiler API Proxy class
444
    };
445
    };
445
446
Lines 747-753 Link Here
747
                    res = pMethod->AddLocalVariable(&(op.val.varID), VT_REFERENCE);
748
                    res = pMethod->AddLocalVariable(&(op.val.varID), VT_REFERENCE);
748
                    if (MRTE_FAILED(res))
749
                    if (MRTE_FAILED(res))
749
                    {
750
                    {
750
                        LOG_ERROR3("CHeapAdaptor", "Failed to create a local varible for "
751
                        LOG_ERROR3("CHeapAdaptor", "Failed to create a local variable for "
751
                            "storing uninitialized object reference. Method %s.%s(%s)", 
752
                            "storing uninitialized object reference. Method %s.%s(%s)", 
752
                            classInfo.szClassName,
753
                            classInfo.szClassName,
753
                            pMethodInstrumentationInfo->szName,
754
                            pMethodInstrumentationInfo->szName,

Return to bug 215437