Closed Bug 1063754 Opened 10 years ago Closed 10 years ago

Factory::HasSSE2 should cache its result

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

Currently Factory::HasSSE2 on x86-32 does a couple of CPUID instructions. It gets called a lot, e.g. for every blur operation and every software-filter primitive evaluation. CPUID is slow so it's a good idea to cache the result of HasSSE2. Most other users of SSE2 do this.

Also, frequent use of CPUID triggers a hardware/hypervisor bug when running Firefox under rr in a virtual machine, so fixing this bug makes record and replay of Firefox in a VM more reliable.
Attachment #8485205 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/5e6dbec98ec4
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: