Last Comment Bug 692903 - InferSpew should identify the scripts it talks about in more detail
: InferSpew should identify the scripts it talks about in more detail
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla10
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-07 13:05 PDT by Jim Blandy :jimb
Modified: 2011-10-09 07:33 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Identify scripts more helpfully in InferSpew output. (1.87 KB, patch)
2011-10-07 13:05 PDT, Jim Blandy :jimb
bhackett1024: review+
Details | Diff | Review

Description Jim Blandy :jimb 2011-10-07 13:05:53 PDT
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
...
Comment 1 Brian Hackett (:bhackett) 2011-10-07 14:20:30 PDT
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
Comment 3 Kyle Huey [:khuey] (khuey@mozilla.com) (Away until 6/13) 2011-10-09 07:33:38 PDT
https://hg.mozilla.org/mozilla-central/rev/f1f27d2354da

Note You need to log in before you can comment on or make changes to this bug.