wdv4758h / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 2 forks source link

tsanv2: instrumentation of vtable reads #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following function should contain only one mop (instrumentation of reads 
from vtable is excessive):

void foobar(X* x) {
    2820:       push   %r14
    2822:       push   %rbx
    2823:       push   %rax
    2824:       mov    %rdi,%rbx
    2827:       mov    0x18(%rsp),%rdi
    282c:       callq  a2a0 <__tsan_func_entry>
  x->barfoo();
    2831:       mov    %rbx,%rdi
    2834:       callq  6830 <__tsan_read8>
    2839:       mov    (%rbx),%r14
    283c:       lea    0x8(%r14),%rdi
    2840:       callq  6830 <__tsan_read8>
    2845:       mov    %rbx,%rdi
    2848:       callq  *0x8(%r14)
}
    284c:       callq  a390 <__tsan_func_exit>
    2851:       add    $0x8,%rsp
    2855:       pop    %rbx
    2856:       pop    %r14
    2858:       retq   

Original issue reported on code.google.com by dvyu...@google.com on 7 Apr 2012 at 12:58

GoogleCodeExporter commented 9 years ago
Implemented in LLVM r154444.
Gives almost 5% saving (counting static instructions, not their execution).

Original comment by konstant...@gmail.com on 10 Apr 2012 at 10:31

GoogleCodeExporter commented 9 years ago

Original comment by konstant...@gmail.com on 10 Apr 2012 at 10:42