logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Profiler bug - counter wraps around

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Ornedan



Joined: 22 May 2005
Posts: 2

PostPosted: Sun May 22, 2005 20:36    Post subject: Profiler bug - counter wraps around Reply with quote

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
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Mon May 23, 2005 8:31    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
NoMercy



Joined: 03 Jan 2005
Posts: 123
Location: UK

PostPosted: Mon May 23, 2005 23:27    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue May 24, 2005 10:56    Post subject: Reply with quote

I will fix this sometime, thanks for reporting it.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group