harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r486662 [2/2] - in /harmony/enhanced/drlvm/trunk: build/custom/msvc_2003/em/ build/custom/msvc_2003/jitrino/ src/test/microbenchmark/harmony-2012/ vm/em/src/ vm/include/open/ vm/jitrino/config/em64t/ vm/jitrino/config/ia32/ vm/jitrino/src/c...
Date Wed, 13 Dec 2006 14:11:12 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.h?view=diff&rev=486662&r1=486661&r2=486662
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.h Wed Dec 13 06:11:10
2006
@@ -31,33 +31,43 @@
 class DrlProfilingInterface : public ProfilingInterface {
 public:
     DrlProfilingInterface(EM_Handle _em, JIT_Handle _jit, EM_ProfileAccessInterface* emProfileAccess)
-        : emHandle(_em), pcHandle(NULL), pcType(ProfileType_Invalid), jitHandle(_jit), profileAccessInterface(emProfileAccess),

+        : emHandle(_em), ebPCHandle(NULL), edgePCHandle(NULL), valuePCHandle(NULL), jitHandle(_jit),
profileAccessInterface(emProfileAccess), 
         jitRole(JITProfilingRole_USE), profilingEnabled(false){}
 
-        virtual MethodProfile* getMethodProfile(MemoryManager& mm, ProfileType type,
MethodDesc& md, JITProfilingRole role=JITProfilingRole_USE) const;
-        virtual bool hasMethodProfile(ProfileType type, MethodDesc& md, JITProfilingRole
role=JITProfilingRole_USE) const;
-        virtual uint32 getProfileMethodCount(MethodDesc& md, JITProfilingRole role =
JITProfilingRole_USE) const;
-
-        virtual bool enableProfiling(PC_Handle pc, JITProfilingRole role);
-        virtual bool isProfilingEnabled(ProfileType pcType, JITProfilingRole jitRole) const
;
-
-        virtual EntryBackedgeMethodProfile* createEBMethodProfile(MemoryManager& mm,
MethodDesc& md);
-        virtual bool isEBProfilerInSyncMode() const;
-        virtual PC_Callback_Fn* getEBProfilerSyncModeCallback() const;
-        
-        virtual EdgeMethodProfile* createEdgeMethodProfile(MemoryManager& mm, MethodDesc&
md, uint32 numEdgeCounters, uint32* counterKeys, uint32 checkSum);
+    PC_Handle getPCHandle(ProfileType type) const;
+    virtual EM_ProfileAccessInterface* getEMProfileAccessInterface() const { return profileAccessInterface;
}
 
-        virtual uint32 getMethodEntryThreshold() const;
-        virtual uint32 getBackedgeThreshold() const;
+    virtual MethodProfile* getMethodProfile(MemoryManager& mm, ProfileType type, MethodDesc&
md, JITProfilingRole role=JITProfilingRole_USE) const;
+    virtual Method_Profile_Handle getMethodProfileHandle(ProfileType type, MethodDesc&
md) const;
+    virtual bool hasMethodProfile(ProfileType type, MethodDesc& md, JITProfilingRole
role=JITProfilingRole_USE) const;
+    virtual uint32 getProfileMethodCount(MethodDesc& md, JITProfilingRole role = JITProfilingRole_USE)
const;
+
+    virtual bool enableProfiling(PC_Handle pc, JITProfilingRole role);
+    virtual bool isProfilingEnabled(ProfileType pcType, JITProfilingRole jitRole) const ;
+
+    virtual EntryBackedgeMethodProfile* createEBMethodProfile(MemoryManager& mm, MethodDesc&
md);
+    virtual bool isEBProfilerInSyncMode() const;
+    virtual PC_Callback_Fn* getEBProfilerSyncModeCallback() const;
+    
+    virtual EdgeMethodProfile* createEdgeMethodProfile(MemoryManager& mm, MethodDesc&
md, uint32 numEdgeCounters, uint32* counterKeys, uint32 checkSum);
+
+    virtual uint32 getMethodEntryThreshold() const;
+    virtual uint32 getBackedgeThreshold() const;
+
+    // value profiler
+    virtual ValueMethodProfile* createValueMethodProfile (MemoryManager& mm, MethodDesc&
md, uint32 numKeys, uint32* Keys);
 
 private:
     EM_Handle emHandle;
-    //Only one profile per JIT is supported
-    PC_Handle pcHandle;
-    ProfileType pcType;
+    // Various types of the profile collectors
+    PC_Handle ebPCHandle, edgePCHandle, valuePCHandle;
+    // ProfileType pcType;
     JIT_Handle jitHandle;
     EM_ProfileAccessInterface* profileAccessInterface;
+    // Only one role supported at one time
     JITProfilingRole jitRole;
+    // There is only one flag so edge and value profile may work only simultaneously
+    // TODO: Better solution is needed when we want to have independent profiles
     bool profilingEnabled;
 };
 
@@ -66,10 +76,10 @@
     DrlEntryBackedgeMethodProfile(Method_Profile_Handle mph, MethodDesc& md, uint32*
_entryCounter, uint32 *_backedgeCounter)
         : EntryBackedgeMethodProfile(mph, md),  entryCounter(_entryCounter), backedgeCounter(_backedgeCounter){}
 
-        virtual uint32 getEntryExecCount() const {return *entryCounter;}
-        virtual uint32 getBackedgeExecCount() const {return *backedgeCounter;}
-        virtual uint32* getEntryCounter() const {return entryCounter;}
-        virtual uint32* getBackedgeCounter() const {return backedgeCounter;}
+    virtual uint32 getEntryExecCount() const {return *entryCounter;}
+    virtual uint32 getBackedgeExecCount() const {return *backedgeCounter;}
+    virtual uint32* getEntryCounter() const {return entryCounter;}
+    virtual uint32* getBackedgeCounter() const {return backedgeCounter;}
 
 private:
     uint32* entryCounter;
@@ -85,6 +95,15 @@
     virtual uint32* getEntryCounter() const;
     virtual uint32* getCounter(uint32 key) const ;
 
+private:
+    EM_ProfileAccessInterface* profileAccessInterface;
+
+};
+
+class DrlValueMethodProfile: public ValueMethodProfile {
+public:
+    DrlValueMethodProfile (Method_Profile_Handle handle, MethodDesc& md,  EM_ProfileAccessInterface*
profileAccessInterface);
+    virtual POINTER_SIZE_INT getTopValue(uint32 instructionKey) const;
 private:
     EM_ProfileAccessInterface* profileAccessInterface;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?view=diff&rev=486662&r1=486661&r2=486662
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Wed Dec 13 06:11:10
2006
@@ -552,10 +552,9 @@
 } //class_get_depth
 
 
-VMEXPORT
 Class_Handle vtable_get_class(VTable_Handle vh) {
     return vh->clss;
-}
+} // vtable_get_class
 
 Boolean class_is_initialized(Class_Handle ch)
 {



Mime
View raw message