View previous topic :: View next topic |
Author |
Message |
Ornedan
Joined: 22 May 2005 Posts: 2
|
Posted: Sun May 22, 2005 20:36 Post subject: Profiler bug - counter wraps around |
|
|
Quote: | Current statistics
-----------------------------------------------------------------------------------------------
x2_mod_def_load 0 msec 1 calls | >mod_hb 2131099 msec 1833 calls *|
mod_hb 80333 msec 25 calls |
-----------------------------------------------------------------------------------------------
Elapsed time : 10696 msec
Runtime delta : 10696 msec
Total cumulative runtime : 2211432 msec
Total number of scriptcalls : 1859
Current statistics
-----------------------------------------------------------------------------------------------
x2_mod_def_load 0 msec 1 calls | >mod_hb 2142305 msec 1836 calls *|
mod_hb 80333 msec 25 calls |
-----------------------------------------------------------------------------------------------
Elapsed time : 11206 msec
Runtime delta : 11206 msec
Total cumulative runtime : 2222638 msec
Total number of scriptcalls : 1862
Current statistics
-----------------------------------------------------------------------------------------------
x2_mod_def_load 0 msec 1 calls | >mod_hb -2141724 msec 1839 calls *|
mod_hb 80333 msec 25 calls |
-----------------------------------------------------------------------------------------------
Elapsed time : 10937 msec
Runtime delta : -4284029 msec
Total cumulative runtime : -2061391 msec
Total number of scriptcalls : 1865
Current statistics
-----------------------------------------------------------------------------------------------
x2_mod_def_load 0 msec 1 calls | >mod_hb -2130859 msec 1842 calls *|
mod_hb 80333 msec 25 calls |
-----------------------------------------------------------------------------------------------
Elapsed time : 10865 msec
Runtime delta : 10865 msec
Total cumulative runtime : -2050526 msec
Total number of scriptcalls : 1868 |
When running the profiler on a module, I noticed that one of the counters had wrapped around as seen in the quote. Damn weird value for an overflow, though... |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Mon May 23, 2005 8:31 Post subject: |
|
|
I don't have made the plugin, but I can imaging that if you run your nwn system a very long time without restarts that the profile counter will wrap around as its just a 32 bit signed integer (based on the size).
What you should do while profiling is doing it only a short time. This way you prefend overflowes like the one you are experiencing. |
|
Back to top |
|
|
NoMercy
Joined: 03 Jan 2005 Posts: 123 Location: UK
|
Posted: Mon May 23, 2005 23:27 Post subject: |
|
|
it's a minor bug for now as you can add 2^32 to that and it'll give you the real number, but it's worth concidering moving it to a unsigned long long, aka uint64.
Ok, can't be bothered to make a patch, as there's no CVS for nwnx2/windows :) |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue May 24, 2005 10:56 Post subject: |
|
|
I will fix this sometime, thanks for reporting it. _________________ Papillon |
|
Back to top |
|
|
|