dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog engine/int_proto.h engine/int_ta...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog engine/int_proto.h engine/int_ta...
Date: Mon, 29 Sep 2008 12:53:38 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      08/09/29 12:53:38

Modified files:
        .              : ChangeLog 
        engine         : int_proto.h int_table.c lib_time.c 

Log message:
        Add internal support functions for the System.Diagnostics.Stopwatch 
class.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3568&r2=1.3569
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/int_proto.h?cvsroot=dotgnu-pnet&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/int_table.c?cvsroot=dotgnu-pnet&r1=1.111&r2=1.112
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/lib_time.c?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3568
retrieving revision 1.3569
diff -u -b -r1.3568 -r1.3569
--- ChangeLog   29 Sep 2008 10:53:06 -0000      1.3568
+++ ChangeLog   29 Sep 2008 12:53:37 -0000      1.3569
@@ -3,6 +3,8 @@
        * engine/engine.h (_ILProfilingStart, _ILProfilingEnd): Change the
        profiling timestamp to the performance counter.
 
+       * engine/int_proto.h, engine/int_table.c: regenerate
+
        * engine/jitc.c: Remove the now obsolete jit type for ILCurrTime.
 
        * engine/jitc_profile.c (_ILJitProfileStart, _ILJitProfileEnd): Replace 
the
@@ -11,6 +13,10 @@
        * engine/lib_profiling (_ILProfilingStart, _ILProfilingEnd): Use the new
        functions in support/time.c now to get the performance counter.
 
+       * engine/lib_time.c (_IL_Stopwatch_GetPerformanceFrequency,
+       _IL_Stopwatch_GetPerformanceCounter): Add internal support functions for
+       the System.Diagnostics.Stopwatch class.
+
        * image/progam.h: Change the profile time counter from ILUInt32 to 
ILUInt64
        to be able to hold a performance counter.
 

Index: engine/int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- engine/int_proto.h  17 Aug 2008 16:45:38 -0000      1.107
+++ engine/int_proto.h  29 Sep 2008 12:53:37 -0000      1.108
@@ -594,8 +594,8 @@
 
 extern void _IL_CryptoMethods_GenerateRandom(ILExecThread * _thread, 
System_Array * buf, ILInt32 offset, ILInt32 count);
 extern ILNativeInt _IL_CryptoMethods_HashNew(ILExecThread * _thread, ILInt32 
algorithm);
-extern void _IL_CryptoMethods_HashReset(ILExecThread * _thread, ILNativeInt 
state);
 extern void _IL_CryptoMethods_HashFree(ILExecThread * _thread, ILNativeInt 
state);
+extern void _IL_CryptoMethods_HashReset(ILExecThread * _thread, ILNativeInt 
state);
 extern void _IL_CryptoMethods_HashUpdate(ILExecThread * _thread, ILNativeInt 
state, System_Array * buffer, ILInt32 offset, ILInt32 count);
 extern void _IL_CryptoMethods_HashFinal(ILExecThread * _thread, ILNativeInt 
state, System_Array * hash);
 extern void _IL_CryptoMethods_Decrypt(ILExecThread * _thread, ILNativeInt 
state, System_Array * inBuffer, ILInt32 inOffset, System_Array * outBuffer, 
ILInt32 outOffset);
@@ -660,6 +660,9 @@
 
 extern void _IL_BlockingOperation_ThreadSigAbort(ILExecThread * _thread, 
ILObject * thread);
 
+extern ILBool _IL_Stopwatch_GetPerformanceFrequency(ILExecThread * _thread, 
ILInt64 * frequency);
+extern ILInt64 _IL_Stopwatch_GetPerformanceCounter(ILExecThread * _thread);
+
 extern void _IL_Process_CloseProcess(ILExecThread * _thread, ILNativeInt 
processHandle, ILInt32 processID);
 extern ILInt32 _IL_Process_GetHandleCount(ILExecThread * _thread, ILNativeInt 
processHandle);
 extern ILNativeInt _IL_Process_GetMainWindowHandle(ILExecThread * _thread, 
ILInt32 processID);

Index: engine/int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -b -r1.111 -r1.112
--- engine/int_table.c  17 Aug 2008 16:45:38 -0000      1.111
+++ engine/int_table.c  29 Sep 2008 12:53:38 -0000      1.112
@@ -2703,8 +2703,8 @@
 IL_METHOD_BEGIN(CryptoMethods_Methods)
        IL_METHOD("GenerateRandom", "([Bii)V", 
_IL_CryptoMethods_GenerateRandom, marshal_vppii)
        IL_METHOD("HashNew", "(i)j", _IL_CryptoMethods_HashNew, marshal_jpi)
-       IL_METHOD("HashReset", "(j)V", _IL_CryptoMethods_HashReset, marshal_vpj)
        IL_METHOD("HashFree", "(j)V", _IL_CryptoMethods_HashFree, marshal_vpj)
+       IL_METHOD("HashReset", "(j)V", _IL_CryptoMethods_HashReset, marshal_vpj)
        IL_METHOD("HashUpdate", "(j[Bii)V", _IL_CryptoMethods_HashUpdate, 
marshal_vpjpii)
        IL_METHOD("HashFinal", "(j[B)V", _IL_CryptoMethods_HashFinal, 
marshal_vpjp)
        IL_METHOD("Decrypt", "(j[Bi[Bi)V", _IL_CryptoMethods_Decrypt, 
marshal_vpjpipi)
@@ -2862,6 +2862,15 @@
 
 #endif
 
+#ifndef _IL_Stopwatch_suppressed
+
+IL_METHOD_BEGIN(Stopwatch_Methods)
+       IL_METHOD("GetPerformanceFrequency", "(&l)Z", 
_IL_Stopwatch_GetPerformanceFrequency, marshal_bpp)
+       IL_METHOD("GetPerformanceCounter", "()l", 
_IL_Stopwatch_GetPerformanceCounter, marshal_lp)
+IL_METHOD_END
+
+#endif
+
 #if !defined(HAVE_LIBFFI)
 
 static void marshal_bpppppiippjppppp(void (*fn)(), void *rvalue, void **avalue)
@@ -3355,6 +3364,9 @@
 #ifndef _IL_Stdio_suppressed
        {"Stdio", "Platform", Stdio_Methods},
 #endif
+#ifndef _IL_Stopwatch_suppressed
+       {"Stopwatch", "System.Diagnostics", Stopwatch_Methods},
+#endif
 #ifndef _IL_String_suppressed
        {"String", "System", String_Methods},
 #endif

Index: engine/lib_time.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_time.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- engine/lib_time.c   28 May 2004 07:03:19 -0000      1.3
+++ engine/lib_time.c   29 Sep 2008 12:53:38 -0000      1.4
@@ -131,6 +131,29 @@
        return 0;
 }
 
+/*
+ * private static bool GetPerformanceFrequency(out long frequency)
+ */
+ILBool _IL_Stopwatch_GetPerformanceFrequency(ILExecThread *_thread,
+                                                                               
           ILInt64 *frequency)
+{
+       return ILGetPerformanceCounterFrequency(frequency);
+}
+
+/*
+ * private static long GetPerformanceCounter()
+ */
+ILInt64 _IL_Stopwatch_GetPerformanceCounter(ILExecThread *_thread)
+{
+       ILInt64 counter;
+
+       if(ILGetPerformanceCounter(&counter))
+       {
+               return counter;
+       }
+       return _IL_TimeMethods_GetCurrentTime(_thread);
+}
+
 #ifdef __cplusplus
 };
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]