• Kirill Smelkov's avatar
    tracing/gotrace: Fix tests for Go1.10 where CGo is now supported · b7e99d87
    Kirill Smelkov authored
    Go1.10 now modifies CGo sources as text, not AST, and this way comments
    are not removed and gotrace can see its '//trace:event ' comments in a
    CGo *.go files: https://github.com/golang/go/commit/85c3ebf4.
    
    This way with Go1.10 tests were failing because `//trace:event
    traceHello()` in a/pkg1/pkg1c.go was now noticed by gotrace and more
    then expected trace events produces.
    
    I have not noticed this in 65c399f0 (tracing/runtime: Add support for
    Go1.10 (preliminary)) probably because at that time above Go commit was
    not in my local Go1.10 tree.
    
    For the reference: tracing/runtime support regenerated for Go1.10.2
    stays exactly the same as in 65c399f0 and so does not need updating.
    b7e99d87
gotrace.go 28.9 KB