IONSPEW=codegen should include some hints about what it's doing

RESOLVED FIXED in mozilla26

Status

()

Core
JavaScript Engine
--
enhancement
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sunfish, Assigned: sunfish)

Tracking

unspecified
mozilla26
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 803970 [details] [diff] [review]
ionspew-functions.patch

The attached patch adds comments to the output of IONSPEW=codegen at various notable points.
Attachment #803970 - Flags: review?(jdemooij)
Comment on attachment 803970 [details] [diff] [review]
ionspew-functions.patch

Review of attachment 803970 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, r=me with nits addressed.

We also emit code for ICs, we could log that as well if you think it's useful.

::: js/src/jit/CodeGenerator.cpp
@@ +5516,5 @@
>  
>  bool
>  CodeGenerator::generateAsmJS()
>  {
> +    if (JSScript *script = gen->info().script()) {

For asm.js we don't use bytecode and script is always NULL (MIRGenerator::compilingAsmJS is defined as info_->script() == NULL). So you can remove this |if| and only keep the IonSpew call in the else branch.

@@ +5564,5 @@
>  
>  bool
>  CodeGenerator::generate()
>  {
> +    if (JSScript *script = gen->info().script()) {

script is always non-NULL, so you can remove the condition + the else branch.

::: js/src/jit/Ion.cpp
@@ +240,5 @@
>      if (!bailoutTail_)
>          return false;
>  
>      if (cx->runtime()->jitSupportsFloatingPoint) {
> +        IonSpew(IonSpew_Codegen, "# Emitting floating-point bailout tables");

Nit: remove "floating-point" here and a few times below. These stubs use some FP instructions so they require FP support (and Odin/Ion are disabled if we don't have that), but they are not FP specific or anything.
Attachment #803970 - Flags: review?(jdemooij) → review+
(Assignee)

Comment 2

5 years ago
(In reply to Jan de Mooij [:jandem] from comment #1)
> Comment on attachment 803970 [details] [diff] [review]
> ionspew-functions.patch
> 
> Review of attachment 803970 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Nice, r=me with nits addressed.

Nits addressed, thanks! https://hg.mozilla.org/integration/mozilla-inbound/rev/5a579b369182

> We also emit code for ICs, we could log that as well if you think it's
> useful.

It does seem useful, but I'm not familiar enough with the IC emitting code to know the best place to do this. Was there a particular place you had in mind?
https://hg.mozilla.org/mozilla-central/rev/5a579b369182
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
(Assignee)

Updated

5 years ago
Assignee: general → sunfish
You need to log in before you can comment on or make changes to this bug.