teresajohnson wrote:
@anjenner are you looking at the remaining reported buildbot failures? E.g. the
unit testing failure below. Please fix or revert this change.
> LLVM Buildbot has detected a new failure on builder
> `llvm-nvptx-nvidia-ubuntu` running on `as-builder-7` while building
> `lld
https://github.com/teresajohnson edited
https://github.com/llvm/llvm-project/pull/115331
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -30,6 +30,7 @@ class CachedFileStream {
CachedFileStream(std::unique_ptr OS,
std::string OSPath = "")
: OS(std::move(OS)), ObjectPathName(OSPath) {}
+ virtual Error commit() { return Error::success(); }
teresajohnson wrote:
If th
@@ -0,0 +1,116 @@
+//===- Caching.cpp
===//
teresajohnson wrote:
Can you test the error when there is no commit?
https://github.com/llvm/llvm-project/pull/115331
___
@@ -0,0 +1,116 @@
+//===- Caching.cpp
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/teresajohnson commented:
I'm a little concerned about the added complexity of the cache interfaces. At
the very least, the required usage of the commit() function should be clearly
documented probably in the main Caching.h header, however, it is a bit
confusing right now bec
https://github.com/teresajohnson approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/94264
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -20,25 +20,25 @@ CHECK-NEXT: -
CHECK: Records:
CHECK-NEXT: -
-CHECK-NEXT:FunctionGUID: 15505678318020221912
+CHECK-NEXT:FunctionGUID: 3873612792189045660
CHECK-NEXT:AllocSites:
CHECK-NEXT:-
CHECK-NEXT: Callstack:
CHECK-NEXT: -
-CHECK-NEXT:
@@ -96,19 +102,63 @@ llvm::SmallVector readSegmentEntries(const
char *Ptr) {
}
llvm::SmallVector>
-readMemInfoBlocks(const char *Ptr) {
+readMemInfoBlocksV3(const char *Ptr) {
using namespace support;
const uint64_t NumItemsToRead =
- endian::readNext(Ptr);
+
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
@@ -0,0 +1,101 @@
+REQUIRES: x86_64-linux
+
+This is a copy of memprof-basict.test with slight changes to check that we can
still read v3 of memprofraw.
+
+To update the inputs used below run Inputs/update_memprof_inputs.sh
/path/to/updated/clang
teresajohnson w
@@ -38,4 +38,5 @@ MEMPROF_FLAG(bool,
allocator_frees_and_returns_null_on_realloc_zero, true,
MEMPROF_FLAG(bool, print_text, false,
"If set, prints the heap profile in text format. Else use the raw binary
serialization format.")
MEMPROF_FLAG(bool, print_terse, false,
-
@@ -205,8 +205,14 @@ class RawMemProfReader final : public MemProfReader {
object::SectionedAddress getModuleOffset(uint64_t VirtualAddress);
+ llvm::SmallVector>
+ readMemInfoBlocks(const char *Ptr);
+
// The profiled binary.
object::OwningBinary Binary;
+ // Vers
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) {
return BuildIds.takeVector();
}
+// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This
+// will help being able to deserialize different versions raw memprof versions
+//
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) {
return BuildIds.takeVector();
}
+// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This
+// will help being able to deserialize different versions raw memprof versions
+//
@@ -0,0 +1,101 @@
+REQUIRES: x86_64-linux
+
+This is a copy of memprof-basict.test with slight changes to check that we can
still read v3 of memprofraw.
teresajohnson wrote:
typo: basict
https://github.com/llvm/llvm-project/pull/94264
__
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
@@ -124,6 +124,13 @@ struct PortableMemInfoBlock {
OS << "" << #Name << ": " << Name << "\n";
#include "llvm/ProfileData/MIBEntryDef.inc"
#undef MIBEntryDef
+if (AccessHistogramSize > 0) {
+ OS << "" << "AccessHistogramValues" << ":";
+ for (uint
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module &M) {
}
}
+// Set MemprofHistogramFlag as a Global veriable in IR. This makes it
accessible
+// to
teresajohnson wrote:
nit: fix line wrapping
https://github.com/llvm/llvm-project/pull/94264
__
@@ -96,19 +102,63 @@ llvm::SmallVector readSegmentEntries(const
char *Ptr) {
}
llvm::SmallVector>
-readMemInfoBlocks(const char *Ptr) {
+readMemInfoBlocksV3(const char *Ptr) {
using namespace support;
const uint64_t NumItemsToRead =
- endian::readNext(Ptr);
+
@@ -20,25 +20,25 @@ CHECK-NEXT: -
CHECK: Records:
CHECK-NEXT: -
-CHECK-NEXT:FunctionGUID: 15505678318020221912
+CHECK-NEXT:FunctionGUID: 3873612792189045660
CHECK-NEXT:AllocSites:
CHECK-NEXT:-
CHECK-NEXT: Callstack:
CHECK-NEXT: -
-CHECK-NEXT:
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module &M) {
}
}
+// Set MemprofHistogramFlag as a Global veriable in IR. This makes it
accessible
+// to
+// the runtime, changing shadow count behavior.
+void createMemprofHistogramFlagVar(Module &M) {
+ const StringRef
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) {
return count;
}
+// Accumulates the access count from the shadow for the given pointer and size.
+// See memprof_mapping.h for an overview on histogram counters.
+u64 GetShadowCountHistogram(uptr p, u32 size) {
+ u
https://github.com/teresajohnson approved this pull request.
compiler-rt changes lgtm
https://github.com/llvm/llvm-project/pull/91857
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
24 matches
Mail list logo