Skip to content

Conversation

tjhance
Copy link
Contributor

@tjhance tjhance commented Jun 25, 2015

In an effort to better understand the performance of our ICs

Add -a flag, which will dump a disassembly of all the ICs to stderr. Next it would be nice to construct a good test program that exercises a representative sample of ICs.

Here's an example output:

    nop   
; _getAttr
    movq    (%rdi), %rax
; _addAttrGuard
    movabsq $79188951816, %r8
    cmpq    336(%rax), %r8
    jne 613
; _addAttrGuard
    movabsq $79188493320, %r8
    cmpq    (%rax), %r8
    jne 594
; _addAttrGuard
    movabsq $79188828936, %r8
    cmpq    384(%rax), %r8
    jne 571
; _getAttr
    movq    392(%rax), %rax
; _getAttr
    movq    32(%rax), %rax
; _addAttrGuard
    movabsq $79188558856, %r8
    cmpq    (%rax), %r8
    jne 541
; _getAttr
    movq    (%rdi), %r8
; _addGuard
    movabsq $79188940584, %r8
    cmpq    %rax, %r8
    jne 519
; _call 
    movabsq $1311768467294899695, %rax
    incl    (%rax)
    movabsq $10410624, %r11
    callq   *%r11 
; commitReturning
; mark inside ic
    movabsq $1311768467294899695, %rcx
    decl    (%rcx)
; live outs

@undingen
Copy link
Contributor

nice, this will help debugging the new jit tier

@tjhance
Copy link
Contributor Author

tjhance commented Jun 25, 2015

One of the llvm headers I had to include required me to add -Wno-non-virtual-dtor to our build. That kinda sucks... If this is a big deal, maybe I can figure out how to add it to just the one file disassemble.cpp?

@toshok
Copy link

toshok commented Jun 25, 2015

oh that output is awesome

On Thu, Jun 25, 2015 at 12:51 AM, Travis Hance [email protected]
wrote:

One of the llvm headers I had to include required me to add
-Wno-non-virtual-dtor to our build. That kinda sucks...


Reply to this email directly or view it on GitHub
#643 (comment).

@tjhance tjhance force-pushed the disasm branch 4 times, most recently from 9ff2a5e to 45b4d31 Compare June 26, 2015 07:44
@tjhance
Copy link
Contributor Author

tjhance commented Jun 26, 2015

I added a script that runs all the *_ics.py tests and outputs some stats

CMakeLists.txt Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to not turn this off -- maybe we could do a #pragma clang diagnostic ignored "-Wnon-virtual-dtor" + push+pop around the offending include? Here's an example of another place we did that. Not sure if we'd need another pragma for gcc.

@tjhance tjhance force-pushed the disasm branch 2 times, most recently from fac8ba8 to 3d783e3 Compare June 27, 2015 04:09
@tjhance
Copy link
Contributor Author

tjhance commented Jun 27, 2015

addressed your comment, kmod

@tjhance
Copy link
Contributor Author

tjhance commented Jul 1, 2015

ping

is this okay to be merged in?

kmod added a commit that referenced this pull request Jul 1, 2015
add -a flag which outputs assembly of ICs
@kmod kmod merged commit 177eb41 into pyston:master Jul 1, 2015
@kmod
Copy link
Collaborator

kmod commented Jul 1, 2015

Ah whoops. I think it has the issue that it shows the assembly pre-relocation, but I think your next PR addresses that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants