Bug 97502 - JSC: add a debugging utility for the C++ llint backend.
Summary: JSC: add a debugging utility for the C++ llint backend.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 17:15 PDT by Mark Lam
Modified: 2012-09-24 17:39 PDT (History)
2 users (show)

See Also:


Attachments
Fix. (3.42 KB, patch)
2012-09-24 17:20 PDT, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2012-09-24 17:15:56 PDT
Added the "cloopDo" instruction that can be used to insert instrumentation in the llint generated code.  For example, when debugging, we can add the following into a llint ASM file:

    cloopDo // printf("I was here!!!\n");

The llint C++ backend will insert whatever is in the // comment as a C++ statement into the generated LLIntAssembly.h file at the location where we insert this cloopDo instruction into the llint ASM instruction stream.

cloopDo instructions should only be used for debugging the C++ llint.  They should not be left in the llint ASM file when we're done debugging.  Support for the cloopDo instruction is left enabled by default for convenience.  It does not affect the produced code if not used.
Comment 1 Mark Lam 2012-09-24 17:20:30 PDT
Created attachment 165474 [details]
Fix.
Comment 2 Geoffrey Garen 2012-09-24 17:26:18 PDT
Comment on attachment 165474 [details]
Fix.

View in context: https://bugs.webkit.org/attachment.cgi?id=165474&action=review

r=me

> Source/JavaScriptCore/offlineasm/parser.rb:107
> +            # We need to parse annotations regardless of whether the backend does
> +            # anything with them or not.

This comment should explain why.
Comment 3 Mark Lam 2012-09-24 17:39:38 PDT
(In reply to comment #2)
> > Source/JavaScriptCore/offlineasm/parser.rb:107
> > +            # We need to parse annotations regardless of whether the backend does
> > +            # anything with them or not.
> 
> This comment should explain why.

The comment has been updated.

Landed in http://trac.webkit.org/changeset/129434.