Last Comment Bug 777032 - use timeBeginPeriod when needed to do high resolution profiling
: use timeBeginPeriod when needed to do high resolution profiling
Status: RESOLVED FIXED
[snappy]
:
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla17
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 12:28 PDT by Jeff Muizelaar [:jrmuizel]
Modified: 2012-07-27 09:02 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use timeBeginPeriod when necessary (885 bytes, patch)
2012-07-25 07:03 PDT, Jeff Muizelaar [:jrmuizel]
ehsan: review+
Details | Diff | Review

Description Jeff Muizelaar [:jrmuizel] 2012-07-24 12:28:34 PDT
The default sleep time on windows is 15.6ms. This is insufficient for our profiling needs.
Comment 1 Jeff Muizelaar [:jrmuizel] 2012-07-25 07:03:17 PDT
Created attachment 645752 [details] [diff] [review]
Use timeBeginPeriod when necessary
Comment 2 :Ehsan Akhgari (busy, don't ask for review please) 2012-07-25 13:36:55 PDT
Comment on attachment 645752 [details] [diff] [review]
Use timeBeginPeriod when necessary

(I hate the :: prefix... It would be good if you can take it out!)
Comment 3 Benoit Girard (:BenWa) 2012-07-25 13:46:38 PDT
I hated it at first but it's the style we use in cocoa to say we're calling into OS library.
Comment 4 :Ehsan Akhgari (busy, don't ask for review please) 2012-07-25 14:06:28 PDT
(In reply to comment #3)
> I hated it at first but it's the style we use in cocoa to say we're calling
> into OS library.

And why did you stop hating it?  I find it distracting, it's like using |this->| to access members...
Comment 5 Benoit Girard (:BenWa) 2012-07-25 14:13:02 PDT
It's easy to know if you're calling something in Gecko or the OS that isn't cross platform. It's similar to using sStaticVar, give you a bit of info.
Comment 6 :Ehsan Akhgari (busy, don't ask for review please) 2012-07-25 14:26:23 PDT
(In reply to comment #5)
> It's easy to know if you're calling something in Gecko or the OS that isn't
> cross platform. It's similar to using sStaticVar, give you a bit of info.

OK, I'm fine with it either way, but note that a :: prefix only shows that you're calling something from the global scope.  It could be Gecko, libc, OS function, etc.
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2012-07-27 09:02:28 PDT
https://hg.mozilla.org/mozilla-central/rev/8ed3f453a114

Note You need to log in before you can comment on or make changes to this bug.