| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
profile data has been dumped to the file.
Summary:
The main use is for users to disable dumping profile data to the file
for certain processes in case the processes don't have permission to
write to the disks, and trying to do so would result in side effects
such as crashes.
Patch by Yuke Liao (@liaoyuke).
Additional context (Chromium use case):
- https://bugs.chromium.org/p/chromium/issues/detail?id=842424
- https://bugs.chromium.org/p/chromium/issues/detail?id=957655
- https://chromium-review.googlesource.com/c/chromium/src/+/1610093
Reviewers: Dor1s, vsk, davidxl
Reviewed By: Dor1s, davidxl
Subscribers: delcypher, davidxl, sajjadm, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D62078
llvm-svn: 361194
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Users can specify the path a raw profile is written to by passing
-fprofile-instr-generate=<path>, but this functionality broke on Darwin
after __llvm_profile_filename was made weak [1], resulting in profiles
being written to "default.profraw" even when <path> is specified.
The situation is that instrumented programs provide a weak definition of
__llvm_profile_filename, which conflicts with a weak redefinition
provided by the profiling runtime.
The linker appears to pick the 'winning' definition arbitrarily: on
Darwin, it usually prefers the larger definition, which is probably why
the instrprof-override-filename.c test has been passing.
The fix is to move the runtime's definition into a separate object file
within the archive. This means that the linker won't "see" the runtime's
definition unless the user program has not provided one. I couldn't
think of a great way to test this other than to mimic the Darwin
failure: use -fprofile-instr-generate=<some-small-path>.
Testing: check-{clang,profile}, modified instrprof-override-filename.c.
[1] [Profile] deprecate __llvm_profile_override_default_filename
https://reviews.llvm.org/D22613
https://reviews.llvm.org/D22614
Differential Revision: https://reviews.llvm.org/D34797
llvm-svn: 306710
|
|
|
|
| |
llvm-svn: 282198
|
|
|
|
|
|
|
|
|
| |
The API is intended to be used by user to do fine
grained (per-region) control of profile dumping.
Differential Revision: http://reviews.llvm.org/D23106
llvm-svn: 278092
|
|
|
|
|
|
| |
and llvm
llvm-svn: 276385
|
|
|
|
|
|
|
|
| |
This eliminates unncessary calls and init functions.
Differential Revision: http://reviews.llvm.org/D22614
llvm-svn: 276355
|
|
|
|
|
|
|
|
|
|
|
| |
- lprofCurFilename was intended to have external visibility. This is
pending further discussion.
- The raw version number doesn't need to be hidden: hiding it may make
it easier to accidentally combine FE/IR profiles.
See the mailing list discussion on r272081.
llvm-svn: 272089
|
|
|
|
|
|
|
|
| |
There are still a few external symbols visible from InstrProfData.inc.
The plan for dealing with those isn't as straightforward, so I'll try it
in a separate commit.
llvm-svn: 272081
|
|
|
|
|
|
|
| |
This is one of the enabler patch to allow value profiler to
allocate counter statically.
llvm-svn: 269689
|
|
|
|
| |
llvm-svn: 268952
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
IR level instrumentation needs to override version with variant bits.
No change for FE instrumentation is needed. Test case is added to
detect version mismatch.
llvm-svn: 257230
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 255290
|
|
|
|
| |
llvm-svn: 255285
|
|
|
|
| |
llvm-svn: 255266
|
|
|
|
| |
llvm-svn: 255068
|
|
|
|
| |
llvm-svn: 254943
|
|
|
|
| |
llvm-svn: 254831
|
|
|
|
|
|
|
|
|
|
| |
cmp&swap is not well supported -- the new test
case triggers some assembler error.
This is a partial fix to the general problem (lack
of atomics operation support for certain targets).
llvm-svn: 254701
|
|
|
|
|
|
|
|
|
|
| |
With the latest refactoring and code sharing patches landed,
it is possible to unify the value profile implementation between
raw and indexed profile. This is part in prfofile runtime.
Differential Revision: http://reviews.llvm.org/D15057
llvm-svn: 254678
|
|
|
|
|
|
|
| |
- Replace duplicate definition and use of magic in profile runtime
- Replace hard coded version reference in profile runtime
llvm-svn: 253885
|
|
|
|
|
|
|
| |
- Replace use of __llvm_profile_value_data with common data structure.
- Remve duplicate InstrProfValueNode
llvm-svn: 253883
|
|
|
|
|
|
|
| |
This makes code more readable and be made more portable in the future.
There is no functional change.
llvm-svn: 253845
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Value profile enumerator change to match LLVM code
ProfData new member field name change to match LLVM code
ProfData member type change to match LLVM code
Do not use lower case for types that are internal to implementation (not exposed to APIs)
There is no functional change. This is a preparation patch to enable more code sharing
in follow up patches
Differential Revision: http://reviews.llvm.org/D14841
llvm-svn: 253700
|
|
|
|
|
|
|
|
| |
MIPS build bots failed due to lack of 64bit atomic operations.
The fix is to disable VP for MIPS target until a better solution
is found.
llvm-svn: 253687
|
|
|
|
| |
llvm-svn: 253510
|
|
|
|
|
|
|
|
|
| |
1. Added missing public API decl in InstrProfiling.h
2. Clang formatting fix
3. Added more comments for new VP code
4. refactor the VP allocation code to make it more readable.
llvm-svn: 253508
|
|
|
|
| |
llvm-svn: 253496
|
|
|
|
|
|
|
|
| |
This change adds extends the data structures and adds in the routines
for handling runtime calls for value profiling. The profile data format
is modified and the version number is incremented.
llvm-svn: 253483
|
|
|
|
|
|
|
|
|
|
|
|
| |
The naming scheme we're using for counters in profile data shares a
prefix with some fixed names we use for the runtime, notably
__llvm_profile_data_begin and _end. Embarrassingly, this means a
function called begin() can't be instrumented.
This modifies the runtime names so as not to collide with the
instrumentation.
llvm-svn: 217166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the API of the instrumented profiling library to work with shared
objects.
- Most things are now declared hidden, so that each executable gets
its own copy.
- Initialization hooks up a linked list of writers.
- The raw format with shared objects that are profiled consists of a
concatenated series of profiles. llvm-profdata knows how to deal
with that since r208938.
<rdar://problem/16918688>
llvm-svn: 208940
|
|
|
|
|
|
|
|
|
| |
Since the profile can come from 32-bit machines, the reader needs to
check the pointer size. Change the magic number to facilitate this.
<rdar://problem/16400648>
llvm-svn: 204556
|
|
|
|
|
|
|
|
|
| |
Include non-text characters in the magic number so that text files can't
match.
<rdar://problem/15950346>
llvm-svn: 204514
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move functions around to prepare for some other changes.
- Merge InstrProfilingExtras.h with InstrProfiling.h. There's no
benefit to having these split.
- Rename InstrProfilingExtras.c to InstrProfilingFile.c.
- Split actual buffer writing code out of InstrProfiling.c into
InstrProfilingBuffer.c.
- Drive-by corrections of a couple of header comments.
<rdar://problem/15943240>
llvm-svn: 204497
|
|
|
|
|
|
|
|
| |
Write a raw binary profile from the runtime.
<rdar://problem/15950346>
llvm-svn: 204495
|
|
|
|
|
|
| |
Return 0 for success, non-0 for failure.
llvm-svn: 204415
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are in the profile runtime. PGO comes later.
Unfortunately, there's only room for 16 characters in a Darwin section,
so use __llvm_prf_ instead of __llvm_profile_ for section names.
<rdar://problem/15943240>
llvm-svn: 204391
|
|
|
|
|
|
|
|
| |
Adding __llvm_pgo_reset_counters(), which sets all the counters to 0.
<rdar://problem/15943240>
llvm-svn: 204386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we register instrumentation data at runtime to determine the
bounds of the sections where the data lives. Soon we'll implement
platform-specific linker magic to determine this at link time.
Move this logic to a separate file, so that our build system can choose
the correct platform-specific code.
No functionality change intended.
<rdar://problem/15943240>
llvm-svn: 204299
|
|
|
|
|
|
| |
<rdar://problem/15943240>
llvm-svn: 204298
|
|
|
|
| |
llvm-svn: 204278
|