Skip to content

Commit

Permalink
Merge branch 'master' into i7046-add-padding-to-align-sections-on-pag…
Browse files Browse the repository at this point in the history
…e-size
  • Loading branch information
ivankyluk authored Dec 17, 2024
2 parents f4ffe5d + a20a2b0 commit cc9ef5b
Show file tree
Hide file tree
Showing 34 changed files with 3,873 additions and 836 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
# We only use a non-zero build # when making multiple manual builds in one day.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
# We only use a non-zero build # when making multiple manual builds in one day.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
# XXX: See x86 job comments on sharing the default ver# with CMakeLists.txt.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
# XXX: See x86 job comments on sharing the default ver# with CMakeLists.txt.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down Expand Up @@ -374,7 +374,7 @@ jobs:
# XXX: See x86 job comments on sharing the default ver# with CMakeLists.txt.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down Expand Up @@ -457,7 +457,7 @@ jobs:
# XXX: See x86 job comments on sharing the default ver# with CMakeLists.txt.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
export VERSION_NUMBER=11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
Expand Down Expand Up @@ -541,7 +541,7 @@ jobs:
# XXX: See x86 job comments on sharing the default ver# with CMakeLists.txt.
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER="11.0.$((`git log -n 1 --format=%ct` / (60*60*24)))"
export VERSION_NUMBER="11.1.$((`git log -n 1 --format=%ct` / (60*60*24)))"
export PREFIX="cronbuild-"
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ endif (EXISTS "${PROJECT_SOURCE_DIR}/.svn")

# N.B.: When updating this, update all the default versions in ci-package.yml
# and ci-docs.yml. We should find a way to share (xref i#1565).
set(VERSION_NUMBER_DEFAULT "11.0.${VERSION_NUMBER_PATCHLEVEL}")
set(VERSION_NUMBER_DEFAULT "11.1.${VERSION_NUMBER_PATCHLEVEL}")
# do not store the default VERSION_NUMBER in the cache to prevent a stale one
# from preventing future version updates in a pre-existing build dir
set(VERSION_NUMBER "" CACHE STRING "Version number: leave empty for default")
Expand Down
24 changes: 12 additions & 12 deletions api/docs/download.dox
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,29 @@ The source code is available:

For the very latest changes since the last official release, you can download \ref page_weekly_builds.

The [11.0.0 release](https://github.com/DynamoRIO/dynamorio/releases/tag/release_11.0.0):
The [11.1.0 release](https://github.com/DynamoRIO/dynamorio/releases/tag/release_11.1.0):

- [DynamoRIO-Windows-11.0.0.zip](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-Windows-11.0.0.zip)
- [DynamoRIO-Windows-11.1.0.zip](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.1.0/DynamoRIO-Windows-11.1.0.zip)

- [DynamoRIO-Linux-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-Linux-11.0.0.tar.gz)
- [DynamoRIO-Linux-11.1.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.1.0/DynamoRIO-Linux-11.1.0.tar.gz)

- [DynamoRIO-ARM-Linux-EABIHF-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-ARM-Linux-EABIHF-11.0.0.tar.gz)
- [DynamoRIO-ARM-Linux-EABIHF-11.1.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.1.0/DynamoRIO-ARM-Linux-EABIHF-11.1.0.tar.gz)

- [DynamoRIO-ARM-Android-EABI-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-ARM-Android-EABI-11.0.0.tar.gz)
- [DynamoRIO-ARM-Android-EABI-11.1.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.1.0/DynamoRIO-ARM-Android-EABI-11.1.0.tar.gz)

- [DynamoRIO-AArch64-Linux-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-AArch64-Linux-11.0.0.tar.gz)
- [DynamoRIO-AArch64-Linux-11.1.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.1.0/DynamoRIO-AArch64-Linux-11.1.0.tar.gz)

The prior [10.0.0 release](https://github.com/DynamoRIO/dynamorio/releases/tag/release_10.0.0):
The [11.0.0 release](https://github.com/DynamoRIO/dynamorio/releases/tag/release_11.0.0):

- [DynamoRIO-Windows-10.0.0.zip](https://github.com/DynamoRIO/dynamorio/releases/download/release_10.0.0/DynamoRIO-Windows-10.0.0.zip)
- [DynamoRIO-Windows-11.0.0.zip](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-Windows-11.0.0.zip)

- [DynamoRIO-Linux-10.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_10.0.0/DynamoRIO-Linux-10.0.0.tar.gz)
- [DynamoRIO-Linux-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-Linux-11.0.0.tar.gz)

- [DynamoRIO-ARM-Linux-EABIHF-10.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_10.0.0/DynamoRIO-ARM-Linux-EABIHF-10.0.0.tar.gz)
- [DynamoRIO-ARM-Linux-EABIHF-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-ARM-Linux-EABIHF-11.0.0.tar.gz)

- [DynamoRIO-ARM-Android-EABI-10.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_10.0.0/DynamoRIO-ARM-Android-EABI-10.0.0.tar.gz)
- [DynamoRIO-ARM-Android-EABI-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-ARM-Android-EABI-11.0.0.tar.gz)

- [DynamoRIO-AArch64-Linux-10.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_10.0.0/DynamoRIO-AArch64-Linux-10.0.0.tar.gz)
- [DynamoRIO-AArch64-Linux-11.0.0.tar.gz](https://github.com/DynamoRIO/dynamorio/releases/download/release_11.0.0/DynamoRIO-AArch64-Linux-11.0.0.tar.gz)


***************************************************************************
Expand Down
8 changes: 8 additions & 0 deletions api/docs/release.dox
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ changes:
is the encoding of the removed instruction up to a pointer's length. Added
#OFFLINE_FILE_VERSION_RETIRED_INSTRUCTIONS_ONLY to increase the trace version
for drmemtraces with uncompleted instructions removed.
- Moved module file read logic into read_module_file() in raw2trace_shared, and
removed raw2trace_directory_t::initialize_module_file() since the
read_module_file() can be directly used without having to pull in the whole
raw2trace_directory_t.

Further non-compatibility-affecting changes include:
- Added X64 Linux support to dr_create_memory_dump(). This API has the same
Expand All @@ -143,6 +147,10 @@ Further non-compatibility-affecting changes include:
- Added the AArch64 FPMR register as DR_REG_FPMR.
- Added OPSZ_addr which chooses the appropriate operand size on X86 from 2/4/8 based
on the 32/64 bit mode and the presence or absence of the address size prefix.
- Fixed the order of operands for the vpexpandd/vpexpandq opcodes (previously the
source and destination operands were reversed).
- Fixed the VEX-encoded forms of vaesdec/vaesdeclast/vaesenc/vaesenclast/vpclmulqdq
to obey VEX.L, which they previously ignored.

**************************************************
<hr>
Expand Down
8 changes: 5 additions & 3 deletions clients/drcachesim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ add_exported_library(drmemtrace_reuse_distance STATIC tools/reuse_distance.cpp)
add_exported_library(drmemtrace_histogram STATIC tools/histogram.cpp)
add_exported_library(drmemtrace_reuse_time STATIC tools/reuse_time.cpp)
add_exported_library(drmemtrace_basic_counts STATIC tools/basic_counts.cpp)
add_exported_library(drmemtrace_opcode_mix STATIC tools/opcode_mix.cpp)
add_exported_library(drmemtrace_opcode_mix STATIC
tools/opcode_mix.cpp tracer/raw2trace_shared.cpp)
add_exported_library(drmemtrace_syscall_mix STATIC tools/syscall_mix.cpp)
add_exported_library(drmemtrace_view STATIC tools/view.cpp)
add_exported_library(drmemtrace_view STATIC
tools/view.cpp tracer/raw2trace_shared.cpp)
add_exported_library(drmemtrace_func_view STATIC tools/func_view.cpp)
add_exported_library(drmemtrace_invariant_checker STATIC tools/invariant_checker.cpp)
add_exported_library(drmemtrace_schedule_stats STATIC tools/schedule_stats.cpp)
Expand Down Expand Up @@ -1202,7 +1204,7 @@ if (BUILD_TESTS)
add_executable(tool.drcacheoff.skip_unit_tests tests/skip_unit_tests.cpp)
configure_DynamoRIO_standalone(tool.drcacheoff.skip_unit_tests)
target_link_libraries(tool.drcacheoff.skip_unit_tests drmemtrace_analyzer
drmemtrace_view drmemtrace_raw2trace test_helpers)
drmemtrace_view test_helpers ${zlib_libs})
add_win32_flags(tool.drcacheoff.skip_unit_tests)
use_DynamoRIO_extension(tool.drcacheoff.skip_unit_tests drreg_static)
use_DynamoRIO_extension(tool.drcacheoff.skip_unit_tests drcovlib_static)
Expand Down
10 changes: 10 additions & 0 deletions clients/drcachesim/tests/burst_syscall_inject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
#include <iostream>
#include <string>
#include <sys/syscall.h>
#include <sys/types.h>
#ifndef LINUX
# error Only Linux is supported
#endif

namespace dynamorio {
namespace drmemtrace {
Expand All @@ -72,6 +76,12 @@ static instr_t *instr_in_gettid = nullptr;
exit(1); \
} while (0)

static pid_t
gettid(void)
{
return syscall(SYS_gettid);
}

static int
do_some_syscalls()
{
Expand Down
20 changes: 13 additions & 7 deletions clients/drcachesim/tools/opcode_mix.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2017-2023 Google, Inc. All rights reserved.
* Copyright (c) 2017-2024 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -56,7 +56,7 @@
#include "dr_api.h"
#include "memref.h"
#include "raw2trace.h"
#include "raw2trace_directory.h"
#include "raw2trace_shared.h"
#include "reader.h"
#include "trace_entry.h"
#include "utils.h"
Expand Down Expand Up @@ -92,13 +92,16 @@ opcode_mix_t::initialize()
return "";
// Legacy trace support where binaries are needed.
// We do not support non-module code for such traces.
std::string error = directory_.initialize_module_file(module_file_path_);
if (!error.empty())
return "Failed to initialize directory: " + error;
file_t modfile;
std::string error = read_module_file(module_file_path_, modfile, modfile_bytes_);
if (!error.empty()) {
return "Failed to read module file: " + error;
}
module_mapper_ =
module_mapper_t::create(directory_.modfile_bytes_, nullptr, nullptr, nullptr,
nullptr, knob_verbose_, knob_alt_module_dir_);
module_mapper_t::create(modfile_bytes_, nullptr, nullptr, nullptr, nullptr,
knob_verbose_, knob_alt_module_dir_);
module_mapper_->get_loaded_modules();
dr_close_file(modfile);
error = module_mapper_->get_last_error();
if (!error.empty())
return "Failed to load binaries: " + error;
Expand All @@ -110,6 +113,9 @@ opcode_mix_t::~opcode_mix_t()
for (auto &iter : shard_map_) {
delete iter.second;
}
if (modfile_bytes_ != nullptr) {
delete[] modfile_bytes_;
}
}

bool
Expand Down
7 changes: 3 additions & 4 deletions clients/drcachesim/tools/opcode_mix.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "analysis_tool.h"
#include "memref.h"
#include "raw2trace.h"
#include "raw2trace_directory.h"
#include "trace_entry.h"

namespace dynamorio {
Expand Down Expand Up @@ -185,9 +184,9 @@ class opcode_mix_t : public analysis_tool_t {
std::string module_file_path_;
std::unique_ptr<module_mapper_t> module_mapper_;
std::mutex mapper_mutex_;
// We reference directory.modfile_bytes throughout operation, so its lifetime
// must match ours.
raw2trace_directory_t directory_;
// XXX: Perhaps module_mapper_t should be made to own the cleanup of
// modfile_bytes_.
char *modfile_bytes_ = nullptr;

std::unordered_map<int, shard_data_t *> shard_map_;
// This mutex is only needed in parallel_shard_init. In all other accesses to
Expand Down
18 changes: 14 additions & 4 deletions clients/drcachesim/tools/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include "memref.h"
#include "memtrace_stream.h"
#include "raw2trace.h"
#include "raw2trace_directory.h"
#include "raw2trace_shared.h"
#include "trace_entry.h"
#include "utils.h"

Expand Down Expand Up @@ -124,9 +124,12 @@ view_t::initialize_stream(memtrace_stream_t *serial_stream)
if (module_file_path_.empty()) {
has_modules_ = false;
} else {
std::string error = directory_.initialize_module_file(module_file_path_);
file_t modfile;
std::string error = read_module_file(module_file_path_, modfile, modfile_bytes_);
if (!error.empty())
has_modules_ = false;
else
dr_close_file(modfile);
}
if (!has_modules_) {
// Continue but omit disassembly to support cases where binaries are
Expand All @@ -136,8 +139,8 @@ view_t::initialize_stream(memtrace_stream_t *serial_stream)
// Legacy trace support where binaries are needed.
// We do not support non-module code for such traces.
module_mapper_ =
module_mapper_t::create(directory_.modfile_bytes_, nullptr, nullptr, nullptr,
nullptr, knob_verbose_, knob_alt_module_dir_);
module_mapper_t::create(modfile_bytes_, nullptr, nullptr, nullptr, nullptr,
knob_verbose_, knob_alt_module_dir_);
module_mapper_->get_loaded_modules();
std::string error = module_mapper_->get_last_error();
if (!error.empty())
Expand Down Expand Up @@ -662,5 +665,12 @@ view_t::print_results()
return true;
}

view_t::~view_t()
{
if (modfile_bytes_ != nullptr) {
delete[] modfile_bytes_;
}
}

} // namespace drmemtrace
} // namespace dynamorio
8 changes: 5 additions & 3 deletions clients/drcachesim/tools/view.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2018-2023 Google, Inc. All rights reserved.
* Copyright (c) 2018-2024 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -47,7 +47,6 @@
#include "memref.h"
#include "memtrace_stream.h"
#include "raw2trace.h"
#include "raw2trace_directory.h"

namespace dynamorio {
namespace drmemtrace {
Expand All @@ -61,6 +60,7 @@ class view_t : public analysis_tool_t {
view_t(const std::string &module_file_path, uint64_t skip_refs, uint64_t sim_refs,
const std::string &syntax, unsigned int verbose,
const std::string &alt_module_dir = "");
virtual ~view_t();
std::string
initialize_stream(memtrace_stream_t *serial_stream) override;
bool
Expand Down Expand Up @@ -136,7 +136,9 @@ class view_t : public analysis_tool_t {
// std::optional here.
std::string module_file_path_;
std::unique_ptr<module_mapper_t> module_mapper_;
raw2trace_directory_t directory_;
// XXX: Perhaps module_mapper_t should be made to own the cleanup of
// modfile_bytes_.
char *modfile_bytes_ = nullptr;

unsigned int knob_verbose_;
int trace_version_;
Expand Down
Loading

0 comments on commit cc9ef5b

Please sign in to comment.