Closed
Bug 604761
Opened 14 years ago
Closed 13 years ago
Improve rdtsc support in the JavaScript engine
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: billm, Assigned: billm)
Details
Attachments
(1 file, 1 obsolete file)
10.49 KB,
patch
|
Details | Diff | Splinter Review |
There are occasional calls to rdtsc() in the JS engine. It's a useful function for performance work. On my machine, it's about 10x faster than gettimeofday (which PRMJ_Now uses under Linux). It would be nice to be able to use rdtsc more. Unfortunately, the definition is squirreled away in nanojit code. Also, the interpretation of the result depends on CPU frequency.
Assignee | ||
Comment 1•14 years ago
|
||
This code moves the definition of rdtsc to a new header and renames it to something js-friendly. It also adds some calibration code that measures the ratio between rdtsc-time and wallclock time (as measured by PRMJ_Now). Finally, it patches jsgcstats to use the normalized times (rather than just dividing by 10e6).
Assignee: general → wmccloskey
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•14 years ago
|
||
This patch adds an Accounting class that Shaver had that looks pretty nice.
Attachment #483595 -
Attachment is obsolete: true
Comment 3•14 years ago
|
||
How are we handling cross-processor rdtsc skew, if at all?
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3) > How are we handling cross-processor rdtsc skew, if at all? Not at all. Usually I only use rdtsc for very short-running things, so migration is unlikely. Also, I don't know of any way to fix this besides pinning to a particular CPU.
I was looking to use it around "script execution", which might be long enough to migrate if it has to page memory. (Mind, I think that if there is "page something in" in the counted time, the error from cross-processor skew is unlikely to dominate.) Chromium has a timer-duration class that has all manner of complication for different Windows setups etc.
Comment 6•13 years ago
|
||
Bill, is this still wanted?
Assignee | ||
Comment 7•13 years ago
|
||
I guess we don't need this.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•