summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-profdata] Improve error messaging when merging mismatched profile dataNathan Slingerland2015-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change tries to make the root cause of instrumented profile data merge failures clearer. Previous: $ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata test_1.profraw: foo: Function count mismatch test_1.profraw: bar: Function count mismatch test_1.profraw: baz: Function count mismatch ... Changed: $ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata test_1.profraw: foo: Function basic block count change detected (counter mismatch) Make sure that all profile data to be merged is generated from the same binary. test_1.profraw: bar: Function basic block count change detected (counter mismatch) test_1.profraw: baz: Function basic block count change detected (counter mismatch) ... Reviewers: dnovillo, davidxl, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14739 llvm-svn: 253384
* enabling sancov tests on linux x86_64 onlyMike Aizatsky2015-11-172-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D14728 llvm-svn: 253354
* SamplePGO - Add dump routines for LineLocation, SampleRecord and FunctionSamplesDiego Novillo2015-11-133-12/+12
| | | | llvm-svn: 253071
* llvm/test/tools/llvm-profdata/text-format-errors.test: Use prepared version ↵NAKAMURA Takumi2015-11-132-2/+2
| | | | | | | | of the input file, instead of using echo. ...and s/\C9/\xC9/ llvm-svn: 253014
* [llvm-profdata] Add check for text profile formats and improve error ↵Nathan Slingerland2015-11-133-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reporting (2nd try) Summary: This change addresses two possible instances of user error / confusion when merging sampled profile data. Previously any input that didn't match the raw or processed instrumented format would automatically be interpreted as instrumented profile text format data. No error would be reported during the merge. Example: If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles: Old behavior: $ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata $ llvm-profdata show -sample foobar-sampled.profdata error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found lprofi This change adds basic checks for valid input data when assuming text input. It also makes error messages related to file format validity more specific about the assumbed profile data type. New behavior: $ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata error: foo.profdata: Unrecognized instrumentation profile encoding format Perhaps you forgot to use the -sample option? Reviewers: bogner, davidxl, dnovillo Subscribers: davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14558 llvm-svn: 253009
* disabling sancov tests: too many failures on different platforms.Mike Aizatsky2015-11-122-0/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D14624 llvm-svn: 252945
* sancov tests - platform independent separatorsMike Aizatsky2015-11-121-4/+4
| | | | llvm-svn: 252943
* sancov test suiteMike Aizatsky2015-11-127-0/+47
| | | | | | Differential Revision: http://reviews.llvm.org/D14589 llvm-svn: 252933
* reverting r252916 to investigate test failureNathan Slingerland2015-11-123-19/+4
| | | | llvm-svn: 252921
* [llvm-profdata] Add check for text profile formats and improve error reportingNathan Slingerland2015-11-123-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change addresses two possible instances of user error / confusion when merging sampled profile data. Previously any input that didn't match the raw or processed instrumented format would automatically be interpreted as instrumented profile text format data. No error would be reported during the merge. Example: If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles: Old behavior: $ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata $ llvm-profdata show -sample foobar-sampled.profdata error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found lprofi This change adds basic checks for valid input data when assuming text input. It also makes error messages related to file format validity more specific about the assumbed profile data type. New behavior: $ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata error: foo.profdata: Unrecognized instrumentation profile encoding format Perhaps you forgot to use the -sample option? Reviewers: bogner, davidxl, dnovillo Subscribers: davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14558 llvm-svn: 252916
* [Object, MachO] Mark symbols from DATA and BSS sections as ST_DataKuba Brecka2015-11-121-3/+3
| | | | | | | | In `MachOObjectFile::getSymbolType` we currently always return `SymbolRef::ST_Function` for symbols from any section. In order for llvm-symbolizer to correctly symbolize Mach-O globals, symbols from data and BSS sections should return `SymbolRef::ST_Data`. Differential Revision: http://reviews.llvm.org/D14576 llvm-svn: 252867
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-112-3/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252798
* Reverting r252760Colin LeMahieu2015-11-112-14/+3
| | | | llvm-svn: 252770
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-112-3/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252760
* dsymutil: Prune module forward decl DIEs if a uniquable definition wasAdrian Prantl2015-11-102-10/+11
| | | | | | | | | | already emitted and fix a latent bug in DIECloner where the DW_CHILDREN_yes flag is set based on the number of children in the input DIE rather than the number of children that are actually being cloned. rdar://problem/23439845 llvm-svn: 252649
* Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match ↵Kevin Enderby2015-11-103-0/+18
| | | | | | | | darwin’s nm(1). Also a small fix to match printing of Mach-O objects with -format posix. llvm-svn: 252567
* [Hexagon] Removing XFAIL on Hexagon target.Colin LeMahieu2015-11-092-2/+0
| | | | llvm-svn: 252450
* DI: Reverse direction of subprogram -> function edge.Peter Collingbourne2015-11-052-8/+8
| | | | | | | | | | | | | | | | | | | | | | | Previously, subprograms contained a metadata reference to the function they described. Because most clients need to get or set a subprogram for a given function rather than the other way around, this created unneeded inefficiency. For example, many passes needed to call the function llvm::makeSubprogramMap() to build a mapping from functions to subprograms, and the IR linker needed to fix up function references in a way that caused quadratic complexity in the IR linking phase of LTO. This change reverses the direction of the edge by storing the subprogram as function-level metadata and removing DISubprogram's function field. Since this is an IR change, a bitcode upgrade has been provided. Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is attached to the PR. Differential Revision: http://reviews.llvm.org/D14265 llvm-svn: 252219
* Reapply r250906 with many suggested updates from Rafael Espindola.Kevin Enderby2015-11-054-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The needed lld matching changes to be submitted immediately next, but this revision will cause lld failures with this alone which is expected. This removes the eating of the error in Archive::Child::getSize() when the characters in the size field in the archive header for the member is not a number. To do this we have all of the needed methods return ErrorOr to push them up until we get out of lib. Then the tools and can handle the error in whatever way is appropriate for that tool. So the solution is to plumb all the ErrorOr stuff through everything that touches archives. This include its iterators as one can create an Archive object but the first or any other Child object may fail to be created due to a bad size field in its header. Thanks to Lang Hames on the changes making child_iterator contain an ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add operator overloading for * and -> . We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash” and using report_fatal_error() to move the error checking will cause the program to stop, neither of which are really correct in library code. There are still some uses of these that should be cleaned up in this library code for other than the size field. The test cases use archives with text files so one can see the non-digit character, in this case a ‘%’, in the size field. These changes will require corresponding changes to the lld project. That will be committed immediately after this change. But this revision will cause lld failures with this alone which is expected. llvm-svn: 252192
* Allow llvm-nm’s single letter command line flags to be grouped.Kevin Enderby2015-11-021-0/+5
| | | | | | | | | | Which is needed if we want to replace darwin’s nm(1) with llvm-nm as there are many uses of grouped flags. The added test case is one specific case that is in real use. rdar://23337419 llvm-svn: 251864
* Implemented the code to make llvm-nm’s -g option work.Kevin Enderby2015-10-303-0/+6
| | | | | | | | | | | | | While llvm-nm parses the -g option and has help that describes it as: -extern-only - Show only external symbols There is no code in the program to use the boolean valve it sets from the command line. rdar://23261095 llvm-svn: 251718
* Backing out commit r250906 as it broke lld.Kevin Enderby2015-10-214-62/+0
| | | | llvm-svn: 250908
* This removes the eating of the error in Archive::Child::getSize() when the ↵Kevin Enderby2015-10-214-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | characters in the size field in the archive header for the member is not a number. To do this we have all of the needed methods return ErrorOr to push them up until we get out of lib. Then the tools and can handle the error in whatever way is appropriate for that tool. So the solution is to plumb all the ErrorOr stuff through everything that touches archives. This include its iterators as one can create an Archive object but the first or any other Child object may fail to be created due to a bad size field in its header. Thanks to Lang Hames on the changes making child_iterator contain an ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add operator overloading for * and -> . We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash” and using report_fatal_error() to move the error checking will cause the program to stop, neither of which are really correct in library code. There are still some uses of these that should be cleaned up in this library code for other than the size field. Also corrected the code where the size gets us to the “at the end of the archive” which is OK but past the end of the archive will return object_error::parse_failed now. The test cases use archives with text files so one can see the non-digit character, in this case a ‘%’, in the size field. llvm-svn: 250906
* Fix windows bot failures from r250699 by removing "/" from expected pathTeresa Johnson2015-10-191-2/+2
| | | | | | in test output. llvm-svn: 250701
* llvm-lto support for generating combined function indexesTeresa Johnson2015-10-192-0/+28
| | | | | | | | | | | | | | | | | Summary: This patch adds support to llvm-lto that mirrors the support added by r249270 to the gold plugin. This enables better testing of combined index generation for ThinLTO. Added a new test, and this support will be used in the test in D13515. Reviewers: joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13847 llvm-svn: 250699
* Disable a test relying on symbol demangling on non-Windows platformsReid Kleckner2015-10-161-0/+3
| | | | llvm-svn: 250587
* [llvm-symbolizer] Use the export table if no symbols are presentReid Kleckner2015-10-164-1/+38
| | | | | | | | This lets us make guesses about symbols in third party DLLs without debug info, like MSVCR120.dll or kernel32.dll. dbghelp does the same thing. llvm-svn: 250582
* [llvm-readobj] Teach ELFDumper about symbol versioning.Davide Italiano2015-10-161-1/+75
| | | | | | Differential Revision: http://reviews.llvm.org/D13824 llvm-svn: 250575
* [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.Davide Italiano2015-10-152-0/+7
| | | | llvm-svn: 250464
* [llvm-readobj/ELF] fix: add correct test inputsIgor Kudrin2015-10-144-0/+0
| | | | llvm-svn: 250292
* [llvm-readobj/ELF] Print GNU Hash sectionIgor Kudrin2015-10-145-0/+63
| | | | | | | | Add a new command line switch, -gnu-hash-table, to print the content of that section. Differential Revision: http://reviews.llvm.org/D13696 llvm-svn: 250291
* Tweak to r250117 and change to use ErrorOr and drop isSizeValid forKevin Enderby2015-10-131-7/+0
| | | | | | | | | | ArchiveMemberHeader, suggestion by Rafael Espíndola. Also The clang-x86-win2008-selfhost bot still does not like the malformed-machos 00000031.a test, so removing it for now. All the other bots are fine with it however. llvm-svn: 250222
* The issue with the malformed-machos 00000031.a test is that it needed ↵Kevin Enderby2015-10-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ‘-arch x86_64’ flag as it was a Mach-O universal file. The default as to which architecture slice that is dumped without an -arch flag depends on the host architecture and the contents of the universal file. The malformed archive 00000031.a file has both an x86_64 and i386 slice. So for for x86_64 hosts only that slice is dumped, for non-x86_64 hosts, which is many of the bots both slices are dumped. The test is intended to only check that the malformation of the x86_64 which has a non-decimal characters in the size field of the archive header so it no longer crashes. The problem turned out that the i388 slice of the malformed archive had a different malformation which was causing the non-x86_64 bots to get this error: llvm-objdump -macho -disassemble -arch i386 00000031.a Archive : .00000031.a 00000031.a(c_start.o): LLVM ERROR: Symbol name entry points before beginning or past end of file. and causing the test as it was written to fail. So by adding ‘-arch x86_64’ it should correct the test and the malformation on the i388 slice will not be dumped. Also the removal of the malformed-machos mem-crup-0261.macho was not causing the issue so that is put back in. Sorry for the churn on these tests, Kev llvm-svn: 250184
* Looks like malformed-machos 00000031.a test is just getting a different errorKevin Enderby2015-10-131-6/+0
| | | | | | on some of the bots. I’ll remove this test for now. llvm-svn: 250141
* Remove the correct unstable malformed-machos test mem-crup-0261.macho andKevin Enderby2015-10-131-3/+6
| | | | | | | restore the malformed-machos 00000031.a test. Hopefully this will get all the build bots happy again. I’ll again keep an eye on them. llvm-svn: 250130
* Temporarily remove the test added in r250117 while I investigate why twoKevin Enderby2015-10-121-6/+0
| | | | | | of the build bots get a different error on that malformed file. llvm-svn: 250120
* Fixed bugs in llvm-obdump while parsing Mach-O files from malformed archivesKevin Enderby2015-10-122-0/+6
| | | | | | | | | that caused aborts. This was because of the characters of the ‘Size’ field in the archive header did not contain decimal characters. rdar://22983603 llvm-svn: 250117
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-123-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D13518 llvm-svn: 250086
* [llvm-symbolizer] Reverting r250067Colin LeMahieu2015-10-122-20/+0
| | | | llvm-svn: 250072
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-122-0/+20
| | | | | | Differential Revision http://reviews.llvm.org/D13518 llvm-svn: 250067
* Move llvm-objdump malformed Mach-O tests to X86 test directory.Kevin Enderby2015-10-108-0/+0
| | | | | | rdar://22983603 llvm-svn: 249927
* Fix a bugs in the Mach-O disassembler when disassembling from aKevin Enderby2015-10-102-0/+6
| | | | | | | | | | malformed Mach-O file that caused a crash. This was because of an assert where the code was incorrectly attempting to parse relocation entries off of the sections and the filetype was not an MH_OBJECT. rdar://22983603 llvm-svn: 249921
* Add inline stack streaming to binary sample profiles.Diego Novillo2015-10-092-0/+50
| | | | | | | | | | | | With this patch we can now read and write inline stacks in sample profiles to the binary encoded profiles. In a subsequent patch, I will add a string table to the binary encoding. Right now function names are emitted as strings every time we find them. This is too bloated and will produce large files in applications with lots of inlining. llvm-svn: 249861
* Fix pdb.test when python is not on PATHReid Kleckner2015-10-091-1/+1
| | | | llvm-svn: 249847
* Fixed two bugs in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-093-0/+9
| | | | | | | | | | | from malformed Mach-O files that caused crashes. The first because the offset in a dyld bind table entry was out of range. The second because their was no image info section and the routine printing it did not have the need check to see the section did not exist. rdar://22983603 llvm-svn: 249845
* Fix coff-dwarf test for non-Windows platforms that cannot demangle MS C++ namesReid Kleckner2015-10-091-0/+3
| | | | llvm-svn: 249795
* Address review comments, remove error case and return 0 instead as required ↵Reid Kleckner2015-10-094-20/+23
| | | | | | by tests llvm-svn: 249785
* [llvm-symbolizer] Make --relative-address work with DWARF contextsReid Kleckner2015-10-095-0/+40
| | | | | | | | | | | | | | | | Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be passed virtual addresses. llvm-symbolizer is now responsible for adding ImageBase to module offsets when --relative-offset is passed. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12883 llvm-svn: 249784
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-082-0/+6
| | | | | | | | | from malformed Mach-O files that caused a crash because of a section header had a size that extended past the end of the file. rdar://22983603 llvm-svn: 249768
* Re-apply r249644: Handle inline stacks in gcov-encoded sample profiles.Diego Novillo2015-10-082-0/+29
| | | | | | | | | | | | | This fixes memory allocation problems by making the merge operation keep the profile readers around until the merged profile has been emitted. This is needed to prevent the inlined function names to disappear from the function profiles. Since all the names are kept as references, once the reader disappears, the names are also deallocated. Additionally, XFAIL on big-endian architectures. The test case uses a gcov file generated on a little-endian system. llvm-svn: 249724
OpenPOWER on IntegriCloud