InferSpew should identify the scripts it talks about in more detail

RESOLVED FIXED in mozilla10

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jimb, Unassigned)

Tracking

unspecified
mozilla10
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 565622 [details] [diff] [review]
Identify scripts more helpfully in InferSpew output.

Still more trivia.

This patch delays assigning id numbers to scripts until the first time the id is
actually retrieved, and at that point produces an InferSpew message
identifying the script by id, address, url and line number. This means that
we only identify scripts we actually mention in InferSpew output.

If JSScript::id had users other than jsinfer, this wouldn't be appropriate.

With this patch applied, we get output like this, the first time a given script is mentioned:

[infer] script #2: 0x7ffff5906660 /home/jimb/moz/dbg/js/src/jit-test/lib/prolog.js:1
[infer] typeSet: T0x9ff748 bytecode0 #2
...
Attachment #565622 - Flags: review?(bhackett1024)
Comment on attachment 565622 [details] [diff] [review]
Identify scripts more helpfully in InferSpew output.

The script file/line numbers are also available when the compartment's types get printed out, though that only happens after execution finishes with INFERFLAGS=result/full
Attachment #565622 - Flags: review?(bhackett1024) → review+
(Reporter)

Comment 2

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6576946586f4
Status: NEW → ASSIGNED
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/f1f27d2354da
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.