| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This header fragment is useful on its own for any consumer that wants
to use custom instruction profile runtime with the LLVM instrumentation.
The concrete use case is in Fuchsia's kernel where we want to use
instruction profile instrumentation, but we cannot use the compiler-rt
runtime because it's not designed for use in the kernel environment.
This change allows installing this header as part of compiler-rt.
Differential Revision: https://reviews.llvm.org/D64532
|
|
|
|
|
| |
This reverts commit f11bc1776fd2815b60e0b1ed97be00b517348162 since it's
failing to build on some bots.
|
|
|
|
|
|
|
|
|
|
|
| |
This header fragment is useful on its own for any consumer that wants
to use custom instruction profile runtime with the LLVM instrumentation.
The concrete use case is in Fuchsia's kernel where we want to use
instruction profile instrumentation, but we cannot use the compiler-rt
runtime because it's not designed for use in the kernel environment.
This change allows installing this header as part of compiler-rt.
Differential Revision: https://reviews.llvm.org/D64532
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The motivating use case is eliminating duplicate profile data registered
for the same inline function in two object files. Before this change,
users would observe multiple symbol definition errors with VC link, but
links with LLD would succeed.
Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
but when using LLD without this static registration, we would get into a
"relocation against a discarded section" situation. I'm not sure what
happens in that situation, but I suspect that duplicate, unused profile
information was retained. If so, this change will reduce the size of
such binaries with LLD.
Now, Windows uses static registration and is in line with all the other
platforms.
Reviewers: davidxl, wmi, inglorion, void, calixte
Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D57929
llvm-svn: 353547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is just a minor cleanup to the allocateOneNode interface. The formals are no-longer used, so I just removed them.
Reviewers: davidxl, void
Reviewed By: davidxl
Subscribers: dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D52509
llvm-svn: 344073
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the following issues:
(1) The strong definition of the merge hook function was not working which
breaks the online value profile merging. This patch removes the weak
attribute of VPMergeHook and assigns the value dynamically.
(2) Truncate the proifle file so that we don't have garbage data at the end of
the file.
(3) Add new __llvm_profile_instrument_target_value() interface to do the value
profile update in batch. This is needed as the original incremental by 1
in __llvm_profile_instrument_target() is too slow for online merge.
Differential Revision: https://reviews.llvm.org/D44847
llvm-svn: 328987
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a few nice bits of refactoring (e.g splitting out the
exclusive locking code into a common utility).
Hopefully the Windows support is fixed now.
Patch by Rainer Orth!
Differential Revision: https://reviews.llvm.org/D40944
llvm-svn: 320731
|
|
|
|
|
|
|
|
|
|
|
| |
runtime to Solaris"
This reverts commit r320726. It looks like flock isn't available on
Windows:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio
llvm-svn: 320728
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a few nice bits of refactoring (e.g splitting out the
exclusive locking code into a common utility).
Patch by Rainer Orth!
Differential Revision: https://reviews.llvm.org/D40944
llvm-svn: 320726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: In the current implementation, the defaul number of values per site tracked by value profiler is 8, which is too small and could introduce inaccuracies to profile. Changing it to 16 will be able to gain more accurate value profiler.
Reviewers: davidxl, tejohnson
Reviewed By: tejohnson
Subscribers: sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D35964
llvm-svn: 309388
|
|
|
|
|
|
|
|
|
| |
This patch adds profile run time support to profile a range of values.
This interface will be used in profiling the size of memory intrinsic calls.
Differential Revision: http://reviews.llvm.org/D28964
llvm-svn: 297895
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27224
llvm-svn: 288204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's the warnings and how they were fixed:
- InstrProfilingUtil.c(110): warning C4013: '_open_osfhandle' undefined; assuming extern returning int
Include io.h to get the prototype.
- warning C4005: 'FILE_MAP_EXECUTE': macro redefinition
Stop trying to support pre-XP versions of Windows, don't attempt to
define this macro.
- InstrProfilingWriter.c(271): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Header'
- InstrProfilingWriter.c(275): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Zeroes'
Turn this warning off. This is definitely legal in C++, all compilers
accept it, and I only have room for half of one language standard in my
brain.
- InstrProfilingValue.c(320): warning C4113: 'uint32_t (__cdecl *)()' differs in parameter lists from 'uint32_t (__cdecl *)(void)'
Fix this with an explicit (void) in the prototype.
- InstrProfilingMerge.c.obj : warning LNK4006: _VPMergeHook already defined in InstrProfilingMergeFile.c.obj; second definition ignored
Last remaining warning. This is from linking a selectany definition with
a strong definition. We need to sort out weak symbols in compiler-rt in
general, though.
llvm-svn: 273026
|
|
|
|
|
|
| |
Skip the last (possibly) incomplete node from padding bytes.
llvm-svn: 271349
|
|
|
|
| |
llvm-svn: 271304
|
|
|
|
| |
llvm-svn: 270928
|
|
|
|
| |
llvm-svn: 270875
|
|
|
|
| |
llvm-svn: 270864
|
|
|
|
|
|
|
|
| |
Tested with relavant benchmarks in SPEC2006
Differential Revision: http://reviews.llvm.org/D20651
llvm-svn: 270862
|
|
|
|
| |
llvm-svn: 270766
|
|
|
|
|
|
|
|
|
| |
The max warning check was masking the "return 0" codepath.
See the thread "Warnings and compile-time failure on 458.sjeng" for more
info.
llvm-svn: 270762
|
|
|
|
|
|
|
|
| |
o make warning message more meaningful to users.
o add suggestion to fix the problem
o limit the max number of output.
llvm-svn: 270483
|
|
|
|
|
|
|
| |
Remove dependency on runtime initializer to avoid
issues related to initialization order.
llvm-svn: 270371
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D20460
llvm-svn: 270337
|
|
|
|
|
|
|
| |
I think we allow use of C99 for libprofile, but use a C-style comment
for consistency.
llvm-svn: 270187
|
|
|
|
| |
llvm-svn: 270179
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D20408
llvm-svn: 270141
|
|
|
|
| |
llvm-svn: 269993
|
|
|
|
|
|
|
| |
This is one of the enabler patch to allow value profiler to
allocate counter statically.
llvm-svn: 269689
|
|
|
|
|
|
|
|
|
|
| |
This is part-3 of the effort to eliminate dependency on
libc allocator in instr profiler runtime. With this change,
the profile dumper is completely free of malloc/calloc.
Value profile instr API implementation is the only remaining
piece with calloc dependency.
llvm-svn: 269576
|
|
|
|
|
|
|
| |
Move runtime specific code from the common header file
to runtime source.
llvm-svn: 269357
|
|
|
|
| |
llvm-svn: 269237
|
|
|
|
|
|
|
| |
Revert r268864 that reverted 268840 after underlying problem
is fixed for arm bot.
llvm-svn: 268992
|
|
|
|
|
|
|
|
| |
This reverts commit r268840, as it breaks Thumb2 self-hosting. There is something
unstable in the profiling for Thumb2 that needs to be sorted out before we continue
implementing these changes to the profiler. See PR27667.
llvm-svn: 268864
|
|
|
|
|
|
|
|
| |
With this patch, value data are longer pre-collected
before writing. The code is simplified and requires
less heap space for dumping.
llvm-svn: 268840
|
|
|
|
|
|
| |
move a function def to InstrProfilingUtil.c
llvm-svn: 262785
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compiler-rt miscalculates the number of entries in the __llvm_prf_data section
on i386 Darwin. This results in a number of test failures (which we started
catching after r261344).
The fix we attempted earlier is insufficient (r261683). It caused some tests to
start passing again, but that hid the fact that we drop some data entries.
This patch should fix the real problem. It fixes the way we compute DataSize by
taking into account the way the Darwin linker lays out __llvm_prf_data.
Differential Revision: http://reviews.llvm.org/D17623
llvm-svn: 261957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a crash when gathering value profile data on i386 Darwin.
The Darwin linker shrinks sections containing aligned structures when
padding is not explicitly added to the end of the structure. When
iterating over these structures, be sure to not walk past the end of the
section.
No tests added, since running `ninja check-profile` on i386 Darwin is
enough to reproduce the original crash.
llvm-svn: 261683
|
|
|
|
| |
llvm-svn: 257147
|
|
|
|
|
|
|
|
|
|
| |
The profile reader no longer depends on this field to be updated and point
to owning func's vp data. The VP data also no longer needs to be allocated
in a contiguous memory space.
Differential Revision: http://reviews.llvm.org/D15258
llvm-svn: 256543
|
|
|
|
| |
llvm-svn: 255748
|
|
Value profile runtime depends on libc which breaks
buffer API implemenation with current file organization.
Test case is also updated to check more symbols.
llvm-svn: 255294
|