https://github.com/rafaelauler approved this pull request.
LGTM, though not an expert in pseudo probes
https://github.com/llvm/llvm-project/pull/99554
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/91667
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2523,6 +2523,16 @@ BinaryFunction
*BinaryContext::getBinaryFunctionAtAddress(uint64_t Address) {
return nullptr;
}
+/// Deregister JumpTable registered at a given \p Address and delete it.
+void BinaryContext::deleteJumpTable(uint64_t Address) {
+ JumpTable *JT =
@@ -1876,6 +1876,13 @@ class X86MCPlusBuilder : public MCPlusBuilder {
//add %r2, %r1
//jmp *%r1
//
+// or a fixed indirect jump template:
+//
+//movslq En(%rip), {%r2|%r1}
+//lea PIC_JUMP_TABLE(%rip), {%r1|%r2} <- MemLocInstr
https://github.com/rafaelauler approved this pull request.
Thanks for working on this, Amir
https://github.com/llvm/llvm-project/pull/91667
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/rafaelauler requested changes to this pull request.
Looks like this is dangerous and crashes binaries in our tests? Do you still
want to move forward with this stack? Or are you working on it? If this stack
is work in progress, maybe mark it as "changes planned" or the
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/91664
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/91663
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/91662
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LGTM thanks
https://github.com/llvm/llvm-project/pull/93075
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/rafaelauler approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/89742
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/86218
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/86218
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/86218
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -244,6 +259,17 @@ void BoltAddressTranslation::writeMaps(std::map ,
InOffset >> 1, BBHash, BBIndex));
}
}
+uint32_t PrevOffset = 0;
+if (!Cold && NumSecondaryEntryPoints) {
+ LLVM_DEBUG(dbgs() << "Secondary entry
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/76911
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/76896
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -128,6 +128,26 @@ class BoltAddressTranslation {
/// Returns BB index by function output address (after BOLT) and basic block
/// input offset.
unsigned getBBIndex(uint64_t FuncOutputAddress, uint32_t BBInputOffset)
const;
+
+ using BBHashMap = std::map>;
+ ///
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/86045
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/86044
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/76910
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76907
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,99 @@
+#include "bolt/Rewrite/JITRewriteInstance.h"
+#include "bolt/Core/BinaryContext.h"
+#include "llvm/BinaryFormat/ELF.h"
+#include "llvm/Support/TargetSelect.h"
+#include "gtest/gtest.h"
+
+using namespace llvm;
+using namespace llvm::object;
+using namespace
https://github.com/rafaelauler approved this pull request.
Thanks, here's what I think is a suitable commit message for this one:
Make core BOLT functionality more friendly to being used as a
library instead of in our standalone driver llvm-bolt. To
accomplish this, we augment BinaryContext
https://github.com/rafaelauler approved this pull request.
Thanks, as commit message:
As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch continue the migration
on libCore, libRewrite and libPasses to use the new BOLTError
class whenever a
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/81522
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
Thanks, as commit message we can put something like:
As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we add a new class
BOLTError and auxiliary functions createFatalBOLTError()
rafaelauler wrote:
Depends on #81082
https://github.com/llvm/llvm-project/pull/81346
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler created
https://github.com/llvm/llvm-project/pull/81346
Add a class that allows a process to introspect or investigate itself by
disassembling its memory contents just-in-time with BOLT. An example is shown
in a new unittest binary.
This leverages the new
@@ -36,9 +37,12 @@ void BoltAddressTranslation::writeEntriesForBB(MapTy ,
if (BBInputOffset == BinaryBasicBlock::INVALID_OFFSET)
return;
- LLVM_DEBUG(dbgs() << "BB " << BB.getName() << "\n");
- LLVM_DEBUG(dbgs() << " Key: " << Twine::utohexstr(BBOutputOffset)
-
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76906
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76905
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/78653
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/76904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
Thanks, looks good.
https://github.com/llvm/llvm-project/pull/76903
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -119,6 +130,7 @@ class BoltAddressTranslation {
uint64_t FuncAddress);
std::map Maps;
+ std::map ColdMaps;
rafaelauler wrote:
Kind of weird that this is only used for write(), and not during parsing. There
is a lost symmetry
@@ -11,6 +11,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/DataExtractor.h"
rafaelauler wrote:
Not sure why was this moved here
https://github.com/llvm/llvm-project/pull/76903
@@ -78,10 +79,20 @@ class BoltAddressTranslation {
BoltAddressTranslation() {}
+ /// Write the serialized address translation table for a function.
+ template
rafaelauler wrote:
Move to private: ?
https://github.com/llvm/llvm-project/pull/76903
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/76903
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -160,12 +164,31 @@ std::error_code BoltAddressTranslation::parse(StringRef
Buf) {
return make_error_code(llvm::errc::io_error);
Error Err(Error::success());
+ std::vector HotFuncs;
rafaelauler wrote:
Is this HotFuncs vector going to be used in
@@ -78,10 +79,20 @@ class BoltAddressTranslation {
BoltAddressTranslation() {}
+ /// Write the serialized address translation table for a function.
+ template
+ void writeMaps(std::map , raw_ostream );
+
/// Write the serialized address translation tables for each
https://github.com/rafaelauler requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/76903
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76902
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -164,12 +167,16 @@ std::error_code BoltAddressTranslation::parse(StringRef
Buf) {
LLVM_DEBUG(dbgs() << "Parsing " << NumEntries << " entries for 0x"
<< Twine::utohexstr(Address) << "\n");
+uint64_t InputOffset = 0, OutputOffset = 0;
@@ -114,9 +114,12 @@ void BoltAddressTranslation::write(const BinaryContext
, raw_ostream ) {
<< Twine::utohexstr(Address) << ".\n");
encodeULEB128(Address, OS);
encodeULEB128(NumEntries, OS);
+uint64_t InOffset = 0, OutOffset = 0;
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/76900
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76900
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler approved this pull request.
Great!
https://github.com/llvm/llvm-project/pull/76899
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -0,0 +1,97 @@
+# BOLT Address Translation (BAT)
+# Purpose
+A regular profile collection for BOLT involves collecting samples from
+unoptimized binary. BOLT Address Translation allows collecting profile
+from BOLT-optimized binary and using it for optimizing the input
https://github.com/rafaelauler approved this pull request.
https://github.com/llvm/llvm-project/pull/76898
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/rafaelauler edited
https://github.com/llvm/llvm-project/pull/76898
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
51 matches
Mail list logo