[llvm] r291529 - [XRay] Implement `llvm-xray convert` -- trace file conversion

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 12:40:17 PST 2017


On Tue, Feb 14, 2017 at 12:33 PM Dimitry Andric <dimitry at andric.com> wrote:

> Hi Dean,
>
> I have been trying to figure out one llvm-xray test failure that occurs
> while testing the release_40 branch (but this same failure also shows up
> for me on trunk):
>
> FAIL: LLVM :: tools/llvm-xray/X86/convert-with-debug-syms.txt (30283 of
> 37661)
> ******************** TEST 'LLVM ::
> tools/llvm-xray/X86/convert-with-debug-syms.txt' FAILED ********************
> Script:
> --
> /home/dim/obj/llvm-294803-rel40-freebsd12-i386-ninja-rel-1/./bin/llvm-xray
> convert -m /share/dim/src/llvm/release_40/test
> /tools/llvm-xray/X86/Inputs/elf64-sample-o2.bin -y
> /share/dim/src/llvm/release_40/test/tools/llvm-xray/X86/Inputs/naive-l
> og-simple.xray -f=yaml -o - 2>&1 |
> /home/dim/obj/llvm-294803-rel40-freebsd12-i386-ninja-rel-1/./bin/FileCheck
> /share/dim/
> src/llvm/release_40/test/tools/llvm-xray/X86/convert-with-debug-syms.txt
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> /share/dim/src/llvm/release_40/test/tools/llvm-xray/X86/convert-with-debug-syms.txt:13:15:
> error: expected string not fou
> nd in input
> ; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37,
> thread: 84697, kind: function-enter,
>               ^
> <stdin>:11:2: note: scanning from here
>  - { type: 0, func-id: 2, function: 'foo(void)', cpu: 37, thread: 84697,
>  ^
> <stdin>:19:2: note: possible intended match here
>  - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind:
> function-exit,
>  ^
>
> --
>
> ********************
>
> What happens here is that the
> test/tools/llvm-xray/X86/convert-with-debug-syms.txt test case has the
> following CHECK-NEXT lines:
>
> ; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37,
> thread: 84697, kind: function-enter,
> ; CHECK-NEXT:       tsc: 3315356841454542 }
>
> However, on my FreeBSD-based systems, the output for the 'foo' and 'bar'
> lines is formatted slightly differently, wrapping at the 'kind' key instead
> of the 'tsc' key:
>
>   - { type: 0, func-id: 2, function: 'foo(void)', cpu: 37, thread: 84697,
>       kind: function-enter, tsc: 3315356841454542 }
>
> Any idea what causes this?  Maybe the yaml outputter is retrieving the
> terminal size differently somehow, and thus wrapping it at another margin?
>
> If so, maybe there is some way of ensuring the output either never wraps,
> or always wraps at the same margin?
>
>
Interesting. I've not found this before. We're currently just using the
defaults for the yaml printer. There could be a way to not pretty-print,
but I haven't explored that specifically.

Can you file a bug on this so that I don't forget to have a look? If you
have time to actually try and fix it, I'd be more than happy to review a
patch for it.

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170214/b6ac6d75/attachment.html>


More information about the llvm-commits mailing list