History log of /llvm-project-15.0.7/compiler-rt/lib/memprof/memprof_allocator.cpp (Results 1 – 20 of 20)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2
# 12e137ab 13-Apr-2022 Vitaly Buka <[email protected]>

[NFC][sanitizer] Consolidate malloc hook invocations


# b84673b3 13-Apr-2022 Vitaly Buka <[email protected]>

[NFC][sanitizer] Remove unnececary HOOK macros


Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# f89319b8 14-Feb-2022 Snehasish Kumar <[email protected]>

Reland "[memprof] Refactor out the MemInfoBlock into a macro based def."

This reverts commit 857ec0d01f8021ff0d9540fcbf6ff24e29868ba4.

Fixes -DLLVM_ENABLE_MODULES=On build by adding the new textual

Reland "[memprof] Refactor out the MemInfoBlock into a macro based def."

This reverts commit 857ec0d01f8021ff0d9540fcbf6ff24e29868ba4.

Fixes -DLLVM_ENABLE_MODULES=On build by adding the new textual
header to the modulemap file.

Reviewed in https://reviews.llvm.org/D117722

show more ...


# 857ec0d0 14-Feb-2022 Snehasish Kumar <[email protected]>

Revert "[memprof] Refactor out the MemInfoBlock into a macro based def."

This reverts commit 9def83c6d02944b2931efd50cd2491953a772aab. [4/4]


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 9def83c6 19-Jan-2022 Snehasish Kumar <[email protected]>

[memprof] Refactor out the MemInfoBlock into a macro based def.

This patch refactors out the MemInfoBlock definition into a macro based
header which can be included to generate enums, structus and c

[memprof] Refactor out the MemInfoBlock into a macro based def.

This patch refactors out the MemInfoBlock definition into a macro based
header which can be included to generate enums, structus and code for
each field recorded by the memprof profiling runtime.

Differential Revision: https://reviews.llvm.org/D117722

show more ...


Revision tags: llvmorg-13.0.1-rc2
# 8306968b 29-Dec-2021 Snehasish Kumar <[email protected]>

[memprof] Move the meminfo block struct to MemProfData.inc.

The definition of the MemInfoBlock is shared between the memprof
compiler-rt runtime and llvm/lib/ProfileData/. This change removes the
me

[memprof] Move the meminfo block struct to MemProfData.inc.

The definition of the MemInfoBlock is shared between the memprof
compiler-rt runtime and llvm/lib/ProfileData/. This change removes the
memprof_meminfoblock header and moves the struct to the shared include
file. To enable this sharing, the Print method is moved to the
memprof_allocator (the only place it is used) and the remaining uses are
updated to refer to the MemInfoBlock defined in the MemProfData.inc
file.

Also a couple of other minor changes which improve usability of the
types in MemProfData.inc.
* Update the PACKED macro to handle commas.
* Add constructors and equality operators.
* Don't initialize the buildid field.

Differential Revision: https://reviews.llvm.org/D116780

show more ...


# 765921de 05-Jan-2022 Dmitry Vyukov <[email protected]>

sanitizer_common: prefix thread-safety macros with SANITIZER_

Currently we use very common names for macros like ACQUIRE/RELEASE,
which cause conflicts with system headers.
Prefix all macros with SA

sanitizer_common: prefix thread-safety macros with SANITIZER_

Currently we use very common names for macros like ACQUIRE/RELEASE,
which cause conflicts with system headers.
Prefix all macros with SANITIZER_ to avoid conflicts.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D116652

show more ...


# 36e6a259 02-Dec-2021 Vitaly Buka <[email protected]>

[NFC][sanitizer] Remove SetSoftRssLimitExceededCallback

According comments on D44404, something like that was the goal.

Reviewed By: morehouse, kstoimenov

Differential Revision: https://reviews.ll

[NFC][sanitizer] Remove SetSoftRssLimitExceededCallback

According comments on D44404, something like that was the goal.

Reviewed By: morehouse, kstoimenov

Differential Revision: https://reviews.llvm.org/D114991

show more ...


# d48d8670 02-Dec-2021 Vitaly Buka <[email protected]>

[NFC][sanitizer] Rename RssLimitExceeded -> IsRssLimitExceeded


Revision tags: llvmorg-13.0.1-rc1
# a4b92d61 19-Nov-2021 Snehasish Kumar <[email protected]>

[memprof] Remove the "Live on exit:" print for text format.

We dropped the printing of live on exit blocks in rG1243cef245f6 -
the commit changed the insertOrMerge logic. Remove the message since it

[memprof] Remove the "Live on exit:" print for text format.

We dropped the printing of live on exit blocks in rG1243cef245f6 -
the commit changed the insertOrMerge logic. Remove the message since it
is no longer needed (all live blocks are inserted into the hashmap)
before serializing/printing the profile. Furthermore, the original
intent was to capture evicted blocks so it wasn't entirely correct.

Also update the binary format test invocation to remove the redundant
print_text directive now that it is the default.

Differential Revision: https://reviews.llvm.org/D114285

show more ...


# 545866cb 12-Oct-2021 Snehasish Kumar <[email protected]>

[memprof] Add a raw binary format to serialize memprof profiles.

This change implements the raw binary format discussed in
https://lists.llvm.org/pipermail/llvm-dev/2021-September/153007.html

Summa

[memprof] Add a raw binary format to serialize memprof profiles.

This change implements the raw binary format discussed in
https://lists.llvm.org/pipermail/llvm-dev/2021-September/153007.html

Summary of changes
* Add a new memprof option to choose binary or text (default) format.
* Add a rawprofile library which serializes the MIB map to profile.
* Add a unit test for rawprofile.
* Mark sanitizer procmaps methods as virtual to be able to mock them.
* Extend memprof_profile_dump regression test.

Differential Revision: https://reviews.llvm.org/D113317

show more ...


# 1243cef2 11-Oct-2021 Snehasish Kumar <[email protected]>

[memprof] Replace the block cache with a hashmap.

The existing implementation uses a cache + eviction based scheme to
record heap profile information. This design was adopted to ensure a
constant me

[memprof] Replace the block cache with a hashmap.

The existing implementation uses a cache + eviction based scheme to
record heap profile information. This design was adopted to ensure a
constant memory overhead (due to fixed number of cache entries) along
with incremental write-to-disk for evictions. We find that since the
number to entries to track is O(unique-allocation-contexts) the overhead
of keeping all contexts in memory is not very high. On a clang workload,
the max number of unique allocation contexts was ~35K, median ~11K.
For each context, we (currently) store 64 bytes of data - this amounts
to 5.5MB (max). Given the low overheads for a complex workload, we can
simplify the implementation by using a hashmap without eviction.

Other changes:
* Memory map is dumped at the end rather than startup. The relative
order in the profile dump is unchanged since we no longer have evicted
entries at runtime.
* Added a test to check meminfoblocks are merged.

Differential Revision: https://reviews.llvm.org/D111676

show more ...


# fc716241 05-Nov-2021 Snehasish Kumar <[email protected]>

[memprof] Move the MemInfoBlock definition to a separate header.

Move the memprof MemInfoBlock struct to it's own header as requested
during the review of D111676.

Differential Revision: https://re

[memprof] Move the MemInfoBlock definition to a separate header.

Move the memprof MemInfoBlock struct to it's own header as requested
during the review of D111676.

Differential Revision: https://reviews.llvm.org/D113315

show more ...


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4
# 24252474 15-Sep-2021 Teresa Johnson <[email protected]>

[MemProf] Fix format warnings

Fix the warnings that show up with -Wformat in this file.


# 37a5a3ae 15-Sep-2021 Teresa Johnson <[email protected]>

[MemProf] Avoid global lock when updating MIB cache

Previously we used a global Allocator-scope mutex to lock when adding a
deallocation to the MIB cache. This resulted in a lot of contention.
Inste

[MemProf] Avoid global lock when updating MIB cache

Previously we used a global Allocator-scope mutex to lock when adding a
deallocation to the MIB cache. This resulted in a lot of contention.
Instead add and use per-set mutexes.

Along with this, we now need to remove the global miss and access count
variables and instead utilize the per-set statistics to report the
overall miss rate.

Differential Revision: https://reviews.llvm.org/D109853

show more ...


Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init
# 0da172b1 09-Jul-2021 Dmitry Vyukov <[email protected]>

sanitizer_common: add thread safety annotations

Enable clang Thread Safety Analysis for sanitizers:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

Thread Safety Analysis can detect inconsist

sanitizer_common: add thread safety annotations

Enable clang Thread Safety Analysis for sanitizers:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

Thread Safety Analysis can detect inconsistent locking,
deadlocks and data races. Without GUARDED_BY annotations
it has limited value. But this does all the heavy lifting
to enable analysis and allows to add GUARDED_BY incrementally.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D105716

show more ...


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2
# d7e71b5d 08-Dec-2020 Jeroen Dobbelaere <[email protected]>

[compiler-rt santizer] Use clock_gettime instead of timespec_get

On RH66, timespec_get is not available. Use clock_gettime instead.

This problem was introduced with D87120

Reviewed By: tejohnson

[compiler-rt santizer] Use clock_gettime instead of timespec_get

On RH66, timespec_get is not available. Use clock_gettime instead.

This problem was introduced with D87120

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D91687

show more ...


Revision tags: llvmorg-11.0.1-rc1
# a75b2e87 19-Nov-2020 Teresa Johnson <[email protected]>

[MemProf] Add interface to dump profile

Add an interface so that the profile can be dumped on demand.

Differential Revision: https://reviews.llvm.org/D91768


# ed4fbe6d 30-Oct-2020 Petr Hosek <[email protected]>

[CMake] Replace ctime with time.h in memprof

Part of D88922


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3
# 3d4bba30 03-Sep-2020 Teresa Johnson <[email protected]>

[MemProf] Memory profiling runtime support

See RFC for background:
http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html

Follow on companion to the clang/llvm instrumentation support in D8

[MemProf] Memory profiling runtime support

See RFC for background:
http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html

Follow on companion to the clang/llvm instrumentation support in D85948
and committed earlier.

This patch adds the compiler-rt runtime support for the memory
profiling.

Note that much of this support was cloned from asan (and then greatly
simplified and renamed). For example the interactions with the
sanitizer_common allocators, error handling, interception, etc.

The bulk of the memory profiling specific code can be found in the
MemInfoBlock, MemInfoBlockCache, and related classes defined and used
in memprof_allocator.cpp.

For now, the memory profile is dumped to text (stderr by default, but
honors the sanitizer_common log_path flag). It is dumped in either a
default verbose format, or an optional terse format.

This patch also adds a set of tests for the core functionality.

Differential Revision: https://reviews.llvm.org/D87120

show more ...