Overview
| Artifact ID: | e6a43b3d970e1c06c61ac8f7ef448d9be4299140 |
|---|---|
| Ticket: | 1821187fffffffffffffffffffffffffffffffff
extend TclpGetWideClicks to other platforms |
| User & Date: | msofer on 2007-10-27 12:08:24 |
Changes
- assignee changed to: "kennykb"
- cmimetype changed to: "text/plain"
- comment changed to:
When working on performance measurements of tiny bites of code (eg, individual instructions in TEBC) the resolution of TclpGetClicks() is sometimes insufficient. But the platform may have click sources of higher resolution. * OSX has TclpGetWideClicks which (I am assuming) has higher resolution * Windows has the QueryPerformanceCounter function, which is used elsewhere in tclWinTime.c but not for this purpose * on Pentium and later x86 cpus the rdtsc opcode is available. On linux, the rdtscll function may or may not be available depending on kernel config, but we can define it as #define GetClicks(foo) do {\ uint32_t __a,__d; \ asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \ (foo) = ((unint64_t)__a) | (((uint64_t)__d)<<32); \ } while(0) * other platforms? The last two solutions (OSX too?) would require that the process be confined to a single cpu to insure accuracy, but we can leave that to the user. - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "06. Time Measurement"
- title changed to: "extend TclpGetWideClicks to other platforms"
- type changed to: "RFE"