Closed Bug 1118952 Opened 9 years ago Closed 9 years ago

Monitor CPU use when entering/leaving a compartment

Categories

(Firefox :: General, defect)

36 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 674779

People

(Reporter: Yoric, Unassigned)

Details

      No description provided.
Nicolas, if I understand correctly our conversation, patching js::RunScript would be a good place to collect the data?
Flags: needinfo?(nicolas.b.pierron)
Otherwise, I was thinking of js::ExclusiveContext::{enterCompartment, enterNullCompartment, leaveCompartment, setCompartment}.
We might switch between compartments more frequently than we are running code within the compartment.  For example anything dealing with cross-compartment will have to switch compartment for creating objects within the host compartment without the need for executing code there.

Also you might want to look at js/src/bm/Probes.h [1], which hjas a StartExecution and a StopExecution which are already present in the code base.

Maybe Jim or Shu might have better ideas?

[1] https://dxr.mozilla.org/mozilla-central/source/js/src/vm/Probes.h
Flags: needinfo?(nicolas.b.pierron)
Let's pursue this discussion over bug 674779.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.