Use clang-format-18 for source formatting (#256)
* Updating clang-format to v18
- Updates the pre-commit-config
- Formats source files according to the utility
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* Update format source workflow
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* Update CONTRIBUTING
* Update comment in .clang-format
* Update CONTRIBUTING.md
* Update helper script
---------
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
[ROCm/rocprofiler-systems commit: 1e13b590e7]
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
6a8cef771e
commit
0403aaa97f
@@ -57,7 +57,7 @@ struct symbol : private tim::unwind::bfd_file::symbol
|
||||
symbol(const symbol&) = default;
|
||||
symbol(symbol&&) noexcept = default;
|
||||
|
||||
symbol& operator=(const symbol&) = default;
|
||||
symbol& operator=(const symbol&) = default;
|
||||
symbol& operator=(symbol&&) noexcept = default;
|
||||
|
||||
bool operator==(const symbol&) const;
|
||||
|
||||
@@ -34,16 +34,16 @@ namespace
|
||||
{
|
||||
template <typename ContainerT, typename... Args>
|
||||
inline auto
|
||||
emplace_impl(ContainerT& _c, int, Args&&... _args)
|
||||
-> decltype(_c.emplace_back(std::forward<Args>(_args)...))
|
||||
emplace_impl(ContainerT& _c, int,
|
||||
Args&&... _args) -> decltype(_c.emplace_back(std::forward<Args>(_args)...))
|
||||
{
|
||||
return _c.emplace_back(std::forward<Args>(_args)...);
|
||||
}
|
||||
|
||||
template <typename ContainerT, typename... Args>
|
||||
inline auto
|
||||
emplace_impl(ContainerT& _c, long, Args&&... _args)
|
||||
-> decltype(_c.emplace(std::forward<Args>(_args)...))
|
||||
emplace_impl(ContainerT& _c, long,
|
||||
Args&&... _args) -> decltype(_c.emplace(std::forward<Args>(_args)...))
|
||||
{
|
||||
return _c.emplace(std::forward<Args>(_args)...);
|
||||
}
|
||||
|
||||
@@ -135,11 +135,11 @@ struct ROCPROFSYS_INTERNAL_API path_type
|
||||
};
|
||||
|
||||
inline path_type(const std::string&);
|
||||
~path_type() = default;
|
||||
path_type(const path_type&) = default;
|
||||
path_type(path_type&&) = default;
|
||||
~path_type() = default;
|
||||
path_type(const path_type&) = default;
|
||||
path_type(path_type&&) = default;
|
||||
path_type& operator=(const path_type&) = default;
|
||||
path_type& operator=(path_type&&) = default;
|
||||
path_type& operator=(path_type&&) = default;
|
||||
|
||||
bool exists() const { return m_type < unknown; }
|
||||
explicit operator bool() const { return exists(); }
|
||||
|
||||
@@ -76,11 +76,11 @@ static_buffer_size()
|
||||
template <typename Tp, typename ContextT = anonymous>
|
||||
struct static_object
|
||||
{
|
||||
static_object() = delete;
|
||||
~static_object() = delete;
|
||||
static_object(const static_object&) = delete;
|
||||
static_object(static_object&&) noexcept = delete;
|
||||
static_object& operator=(const static_object&) = delete;
|
||||
static_object() = delete;
|
||||
~static_object() = delete;
|
||||
static_object(const static_object&) = delete;
|
||||
static_object(static_object&&) noexcept = delete;
|
||||
static_object& operator=(const static_object&) = delete;
|
||||
static_object& operator=(static_object&&) noexcept = delete;
|
||||
|
||||
template <typename... Args>
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
: m_data{ std::move(data) }
|
||||
{}
|
||||
|
||||
synchronized(synchronized&& data) noexcept = default;
|
||||
synchronized(synchronized&& data) noexcept = default;
|
||||
synchronized& operator=(synchronized&& data) noexcept = default;
|
||||
|
||||
// Do not allow this data structure to be copied, std::move only.
|
||||
|
||||
@@ -54,8 +54,7 @@ address_range::as_string(int _depth) const
|
||||
_ss << std::hex;
|
||||
_ss << std::setw(2 * _depth) << "";
|
||||
_ss.fill('0');
|
||||
_ss << "0x" << std::setw(16) << low << "-"
|
||||
<< "0x" << std::setw(16) << high;
|
||||
_ss << "0x" << std::setw(16) << low << "-" << "0x" << std::setw(16) << high;
|
||||
return _ss.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,9 @@ template <typename Tp>
|
||||
struct can_stringify
|
||||
{
|
||||
private:
|
||||
static constexpr auto sfinae(int)
|
||||
-> decltype(std::declval<std::ostream&>() << std::declval<Tp>(), bool())
|
||||
static constexpr auto sfinae(int) -> decltype(std::declval<std::ostream&>()
|
||||
<< std::declval<Tp>(),
|
||||
bool())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1292,7 +1292,8 @@ get_use_sampling_cputime()
|
||||
return static_cast<tim::tsettings<bool>&>(*_v->second).get();
|
||||
}
|
||||
|
||||
std::set<int> get_sampling_signals(int64_t)
|
||||
std::set<int>
|
||||
get_sampling_signals(int64_t)
|
||||
{
|
||||
auto _v = std::set<int>{};
|
||||
if(get_use_causal())
|
||||
@@ -1561,7 +1562,7 @@ print_settings(
|
||||
{
|
||||
size_t _wextra = (_md && i < 2) ? 2 : 0;
|
||||
_widths.at(i) = std::max<size_t>(_widths.at(i),
|
||||
_data.back().at(i).length() + _wextra);
|
||||
_data.back().at(i).length() + _wextra);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1593,8 +1594,7 @@ print_settings(
|
||||
_spacer_extra -= 1;
|
||||
std::stringstream _spacer{};
|
||||
_spacer.fill('-');
|
||||
_spacer << "#" << std::setw(tot_width + _spacer_extra) << ""
|
||||
<< "#";
|
||||
_spacer << "#" << std::setw(tot_width + _spacer_extra) << "" << "#";
|
||||
_os << _spacer.str() << "\n";
|
||||
for(const auto& itr : _data)
|
||||
{
|
||||
|
||||
@@ -262,7 +262,8 @@ spec::operator()(const stages& _stages) const
|
||||
auto _del = (_dur * units::sec);
|
||||
auto _end = _now + _del;
|
||||
while(get_clock_now(_spec.clock_id.value) < _end && (_ret = _func(_spec)))
|
||||
{}
|
||||
{
|
||||
}
|
||||
return _ret;
|
||||
};
|
||||
|
||||
@@ -275,7 +276,8 @@ spec::operator()(const stages& _stages) const
|
||||
if(_stages.init(_spec) && _wait(_stages.wait, _spec.delay) &&
|
||||
_stages.start(_spec) && _wait(_stages.collect, _spec.duration) &&
|
||||
_stages.stop(_spec))
|
||||
{}
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
|
||||
+4
-4
@@ -69,10 +69,10 @@ struct aligned_static_vector
|
||||
using size_type = size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
aligned_static_vector() = default;
|
||||
aligned_static_vector(const aligned_static_vector&) = default;
|
||||
aligned_static_vector(aligned_static_vector&&) noexcept = default;
|
||||
aligned_static_vector& operator=(const aligned_static_vector&) = default;
|
||||
aligned_static_vector() = default;
|
||||
aligned_static_vector(const aligned_static_vector&) = default;
|
||||
aligned_static_vector(aligned_static_vector&&) noexcept = default;
|
||||
aligned_static_vector& operator=(const aligned_static_vector&) = default;
|
||||
aligned_static_vector& operator=(aligned_static_vector&&) noexcept = default;
|
||||
|
||||
aligned_static_vector(size_t _n, Tp _v = {});
|
||||
|
||||
@@ -44,9 +44,9 @@ struct c_array
|
||||
, m_size{ _size }
|
||||
{}
|
||||
|
||||
~c_array() = default;
|
||||
c_array(const c_array&) = default;
|
||||
c_array& operator=(const c_array&) = default;
|
||||
~c_array() = default;
|
||||
c_array(const c_array&) = default;
|
||||
c_array& operator=(const c_array&) = default;
|
||||
c_array& operator=(c_array&&) noexcept = default;
|
||||
|
||||
// Get the size of the wrapped array
|
||||
|
||||
@@ -51,10 +51,10 @@ struct static_vector
|
||||
using size_type = size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
static_vector() = default;
|
||||
static_vector(const static_vector&) = default;
|
||||
static_vector(static_vector&&) noexcept = default;
|
||||
static_vector& operator=(const static_vector&) = default;
|
||||
static_vector() = default;
|
||||
static_vector(const static_vector&) = default;
|
||||
static_vector(static_vector&&) noexcept = default;
|
||||
static_vector& operator=(const static_vector&) = default;
|
||||
static_vector& operator=(static_vector&&) noexcept = default;
|
||||
|
||||
static_vector(size_t _n, Tp _v = {});
|
||||
|
||||
@@ -56,7 +56,7 @@ std::atomic<FILE*>&
|
||||
get_file_pointer()
|
||||
{
|
||||
static auto _v = std::atomic<FILE*>{ []() {
|
||||
const auto&_fname= get_file_name();
|
||||
const auto& _fname = get_file_name();
|
||||
if(!_fname.empty()) tim::log::monochrome() = true;
|
||||
return (_fname.empty())
|
||||
? stderr
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
|
||||
#if !defined(ROCPROFSYS_DEFAULT_OBJECT)
|
||||
# define ROCPROFSYS_DEFAULT_OBJECT(NAME) \
|
||||
NAME() = default; \
|
||||
NAME(const NAME&) = default; \
|
||||
NAME(NAME&&) noexcept = default; \
|
||||
NAME& operator=(const NAME&) = default; \
|
||||
NAME() = default; \
|
||||
NAME(const NAME&) = default; \
|
||||
NAME(NAME&&) noexcept = default; \
|
||||
NAME& operator=(const NAME&) = default; \
|
||||
NAME& operator=(NAME&&) noexcept = default;
|
||||
#endif
|
||||
|
||||
#if !defined(ROCPROFSYS_DEFAULT_COPY_MOVE)
|
||||
# define ROCPROFSYS_DEFAULT_COPY_MOVE(NAME) \
|
||||
NAME(const NAME&) = default; \
|
||||
NAME(NAME&&) noexcept = default; \
|
||||
NAME& operator=(const NAME&) = default; \
|
||||
NAME(const NAME&) = default; \
|
||||
NAME(NAME&&) noexcept = default; \
|
||||
NAME& operator=(const NAME&) = default; \
|
||||
NAME& operator=(NAME&&) noexcept = default;
|
||||
#endif
|
||||
|
||||
@@ -38,10 +38,10 @@ find_library_path(const std::string& _name, const std::vector<std::string>& _env
|
||||
|
||||
struct dynamic_library
|
||||
{
|
||||
dynamic_library() = delete;
|
||||
dynamic_library(const dynamic_library&) = delete;
|
||||
dynamic_library(dynamic_library&&) noexcept = default;
|
||||
dynamic_library& operator=(const dynamic_library&) = delete;
|
||||
dynamic_library() = delete;
|
||||
dynamic_library(const dynamic_library&) = delete;
|
||||
dynamic_library(dynamic_library&&) noexcept = default;
|
||||
dynamic_library& operator=(const dynamic_library&) = delete;
|
||||
dynamic_library& operator=(dynamic_library&&) noexcept = default;
|
||||
|
||||
dynamic_library(std::string _env, std::string _fname,
|
||||
|
||||
@@ -92,7 +92,7 @@ exception<Tp>::operator=(const exception& _rhs)
|
||||
if(this != &_rhs)
|
||||
{
|
||||
Tp::operator=(_rhs);
|
||||
m_what = strdup(_rhs.m_what);
|
||||
m_what = strdup(_rhs.m_what);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
~exception() override;
|
||||
|
||||
exception(exception&&) noexcept = default;
|
||||
exception(exception&&) noexcept = default;
|
||||
exception& operator=(exception&&) noexcept = default;
|
||||
|
||||
exception(const exception&);
|
||||
|
||||
@@ -92,12 +92,12 @@ struct dummy_data_type
|
||||
# if defined(MPICH) && (MPICH > 0)
|
||||
static constexpr bool is_mpich = true;
|
||||
# else
|
||||
static constexpr bool is_mpich = false;
|
||||
static constexpr bool is_mpich = false;
|
||||
# endif
|
||||
# if defined(OPEN_MPI) && (OPEN_MPI > 0)
|
||||
static constexpr bool is_openmpi = true;
|
||||
# else
|
||||
static constexpr bool is_openmpi = false;
|
||||
static constexpr bool is_openmpi = false;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -116,9 +116,9 @@ static const comm_t comm_world_v = nullptr;
|
||||
static const comm_t comm_self_v = nullptr;
|
||||
static const info_t info_null_v = nullptr;
|
||||
# else
|
||||
static const comm_t comm_world_v = MPI_COMM_WORLD;
|
||||
static const comm_t comm_self_v = MPI_COMM_SELF;
|
||||
static const info_t info_null_v = MPI_INFO_NULL;
|
||||
static const comm_t comm_world_v = MPI_COMM_WORLD;
|
||||
static const comm_t comm_self_v = MPI_COMM_SELF;
|
||||
static const info_t info_null_v = MPI_INFO_NULL;
|
||||
# endif
|
||||
static const int success_v = MPI_SUCCESS;
|
||||
static const int comm_type_shared_v = MPI_COMM_TYPE_SHARED;
|
||||
@@ -236,7 +236,7 @@ quiet()
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
#if !defined(ROCPROFSYS_MPI_ERROR_FUNCTION)
|
||||
# define ROCPROFSYS_MPI_ERROR_FUNCTION(FUNC, ...) # FUNC
|
||||
# define ROCPROFSYS_MPI_ERROR_FUNCTION(FUNC, ...) #FUNC
|
||||
#endif
|
||||
|
||||
#if !defined(ROCPROFSYS_MPI_ERROR_CHECK)
|
||||
@@ -454,8 +454,12 @@ size(comm_t comm)
|
||||
return std::max(_size, (int32_t) 1);
|
||||
}
|
||||
|
||||
void set_rank(int32_t, comm_t) {}
|
||||
void set_size(int32_t, comm_t) {}
|
||||
void
|
||||
set_rank(int32_t, comm_t)
|
||||
{}
|
||||
void
|
||||
set_size(int32_t, comm_t)
|
||||
{}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ enum class sample : uint64_t
|
||||
#if defined(PERF_SAMPLE_READ)
|
||||
read = PERF_SAMPLE_READ,
|
||||
#else
|
||||
read = 0,
|
||||
read = 0,
|
||||
#endif
|
||||
|
||||
callchain = PERF_SAMPLE_CALLCHAIN,
|
||||
@@ -70,61 +70,61 @@ enum class sample : uint64_t
|
||||
#if defined(PERF_SAMPLE_BRANCH_STACK)
|
||||
branch_stack = PERF_SAMPLE_BRANCH_STACK,
|
||||
#else
|
||||
branch_stack = 0,
|
||||
branch_stack = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_REGS_USER)
|
||||
regs = PERF_SAMPLE_REGS_USER,
|
||||
#else
|
||||
regs = 0,
|
||||
regs = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_STACK_USER)
|
||||
stack = PERF_SAMPLE_STACK_USER,
|
||||
#else
|
||||
stack = 0,
|
||||
stack = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_WEIGHT)
|
||||
weight = PERF_SAMPLE_WEIGHT,
|
||||
#else
|
||||
weight = 0,
|
||||
weight = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_DATA_SRC)
|
||||
data_src = PERF_SAMPLE_DATA_SRC,
|
||||
#else
|
||||
data_src = 0,
|
||||
data_src = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_IDENTIFIER)
|
||||
identifier = PERF_SAMPLE_IDENTIFIER,
|
||||
#else
|
||||
identifier = 0,
|
||||
identifier = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_TRANSACTION)
|
||||
transaction = PERF_SAMPLE_TRANSACTION,
|
||||
#else
|
||||
transaction = 0,
|
||||
transaction = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_REGS_INTR)
|
||||
regs_intr = PERF_SAMPLE_REGS_INTR,
|
||||
#else
|
||||
regs_intr = 0,
|
||||
regs_intr = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_PHYS_ADDR)
|
||||
phys_addr = PERF_SAMPLE_PHYS_ADDR,
|
||||
#else
|
||||
phys_addr = 0,
|
||||
phys_addr = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_SAMPLE_CGROUP)
|
||||
cgroup = PERF_SAMPLE_CGROUP,
|
||||
#else
|
||||
cgroup = 0,
|
||||
cgroup = 0,
|
||||
#endif
|
||||
|
||||
last = PERF_SAMPLE_MAX
|
||||
@@ -213,31 +213,31 @@ enum class record_type
|
||||
#if defined(PERF_RECORD_MMAP2)
|
||||
mmap2 = PERF_RECORD_MMAP2,
|
||||
#else
|
||||
mmap2 = 0,
|
||||
mmap2 = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_AUX)
|
||||
aux = PERF_RECORD_AUX,
|
||||
#else
|
||||
aux = 0,
|
||||
aux = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_ITRACE_START)
|
||||
itrace_start = PERF_RECORD_ITRACE_START,
|
||||
#else
|
||||
itrace_start = 0,
|
||||
itrace_start = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_LOST_SAMPLES)
|
||||
lost_samples = PERF_RECORD_LOST_SAMPLES,
|
||||
#else
|
||||
lost_samples = 0,
|
||||
lost_samples = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_SWITCH)
|
||||
switch_record = PERF_RECORD_SWITCH,
|
||||
#else
|
||||
switch_record = 0,
|
||||
switch_record = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_SWITCH_CPU_WIDE)
|
||||
@@ -249,31 +249,31 @@ enum class record_type
|
||||
#if defined(PERF_RECORD_NAMESPACES)
|
||||
namespaces = PERF_RECORD_NAMESPACES,
|
||||
#else
|
||||
namespaces = 0,
|
||||
namespaces = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_KSYMBOL)
|
||||
ksymbol = PERF_RECORD_KSYMBOL,
|
||||
#else
|
||||
ksymbol = 0,
|
||||
ksymbol = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_BPF_EVENT)
|
||||
bpf_event = PERF_RECORD_BPF_EVENT,
|
||||
#else
|
||||
bpf_event = 0,
|
||||
bpf_event = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_CGROUP)
|
||||
cgroup = PERF_RECORD_CGROUP,
|
||||
#else
|
||||
cgroup = 0,
|
||||
cgroup = 0,
|
||||
#endif
|
||||
|
||||
#if defined(PERF_RECORD_TEXT_POKE)
|
||||
text_poke = PERF_RECORD_TEXT_POKE,
|
||||
#else
|
||||
text_poke = 0,
|
||||
text_poke = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -476,14 +476,13 @@ std::unordered_set<rocprofiler_buffer_tracing_kind_t>
|
||||
get_buffered_domains()
|
||||
{
|
||||
const auto buffer_tracing_info = rocprofiler::sdk::get_buffer_tracing_names();
|
||||
const auto supported = std::unordered_set<rocprofiler_buffer_tracing_kind_t>
|
||||
{
|
||||
const auto supported = std::unordered_set<rocprofiler_buffer_tracing_kind_t>{
|
||||
ROCPROFILER_BUFFER_TRACING_KERNEL_DISPATCH,
|
||||
ROCPROFILER_BUFFER_TRACING_MEMORY_COPY,
|
||||
ROCPROFILER_BUFFER_TRACING_MEMORY_COPY,
|
||||
# if(ROCPROFILER_VERSION < 10000)
|
||||
ROCPROFILER_BUFFER_TRACING_PAGE_MIGRATION,
|
||||
ROCPROFILER_BUFFER_TRACING_PAGE_MIGRATION,
|
||||
# endif
|
||||
ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY,
|
||||
ROCPROFILER_BUFFER_TRACING_SCRATCH_MEMORY,
|
||||
};
|
||||
|
||||
auto _data = std::unordered_set<rocprofiler_buffer_tracing_kind_t>{};
|
||||
|
||||
@@ -31,16 +31,16 @@ namespace
|
||||
{
|
||||
template <typename ContainerT, typename Arg>
|
||||
auto
|
||||
emplace_impl(ContainerT& _targ, Arg&& _v, int)
|
||||
-> decltype(_targ.emplace(std::forward<Arg>(_v)))
|
||||
emplace_impl(ContainerT& _targ, Arg&& _v,
|
||||
int) -> decltype(_targ.emplace(std::forward<Arg>(_v)))
|
||||
{
|
||||
return _targ.emplace(std::forward<Arg>(_v));
|
||||
}
|
||||
|
||||
template <typename ContainerT, typename Arg>
|
||||
auto
|
||||
emplace_impl(ContainerT& _targ, Arg&& _v, long)
|
||||
-> decltype(_targ.emplace_back(std::forward<Arg>(_v)))
|
||||
emplace_impl(ContainerT& _targ, Arg&& _v,
|
||||
long) -> decltype(_targ.emplace_back(std::forward<Arg>(_v)))
|
||||
{
|
||||
return _targ.emplace_back(std::forward<Arg>(_v));
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ typedef unsigned __int8 uint8_t;
|
||||
# if defined(arch_x86_64) || defined(arch_64bit)
|
||||
# define TYPE64BIT
|
||||
# endif
|
||||
typedef long double double128_t;
|
||||
typedef long double double128_t;
|
||||
|
||||
# elif defined(os_freebsd)
|
||||
# if !defined(__STDC_CONSTANT_MACROS)
|
||||
@@ -136,7 +136,7 @@ typedef int64_t time64;
|
||||
# if defined(__cplusplus)
|
||||
# include "h/dyntypes.h"
|
||||
using namespace Dyninst;
|
||||
static const Address ADDR_NULL = (Address)(0);
|
||||
static const Address ADDR_NULL = (Address) (0);
|
||||
# else
|
||||
# define ADDR_NULL (0)
|
||||
typedef unsigned long Address;
|
||||
@@ -152,9 +152,9 @@ typedef long long int RegValue; /* register content 64-bit */
|
||||
/* This needs to be an int since it is sometimes used to pass offsets
|
||||
to the code generator (i.e. if-statement) - jkh 5/24/99 */
|
||||
typedef unsigned int Register; /* a register number, e.g., [0..31] */
|
||||
static const Register Null_Register = (Register)(-1); /* '255' */
|
||||
static const Register Null_Register = (Register) (-1); /* '255' */
|
||||
/* Easily noticeable name... */
|
||||
static const Register REG_NULL = (Register)(-1);
|
||||
static const Register REG_NULL = (Register) (-1);
|
||||
|
||||
// Virtual Memory Map -- shared between platforms
|
||||
# define PREMS_PRIVATE (1 << 4)
|
||||
|
||||
@@ -91,10 +91,10 @@ typedef DWORD psaddr_t; // for breakpoints; match the debug struct
|
||||
# define NULL_THR_ID INVALID_HANDLE_VALUE
|
||||
# define DYNINST_SINGLETHREADED INVALID_HANDLE_VALUE
|
||||
# else
|
||||
typedef int PID;
|
||||
typedef int PROC_HANDLE;
|
||||
typedef int LWP;
|
||||
typedef long THR_ID;
|
||||
typedef int PID;
|
||||
typedef int PROC_HANDLE;
|
||||
typedef int LWP;
|
||||
typedef long THR_ID;
|
||||
|
||||
# define NULL_PID -1
|
||||
# define NULL_LWP -1
|
||||
|
||||
@@ -273,7 +273,7 @@ DYNINST_instForkEntry()
|
||||
DLLEXPORT void
|
||||
DYNINST_instForkExit(void* arg1)
|
||||
{
|
||||
//#warning "This function is not implemented for AARCH64 yet!"
|
||||
// #warning "This function is not implemented for AARCH64 yet!"
|
||||
#if !defined(arch_aarch64)
|
||||
tc_lock_lock(&DYNINST_trace_lock);
|
||||
|
||||
@@ -306,7 +306,7 @@ DYNINST_instForkExit(void* arg1)
|
||||
DLLEXPORT void
|
||||
DYNINST_instExecEntry(void* arg1)
|
||||
{
|
||||
//#warning "This function is not implemented for AARCH64 yet!"
|
||||
// #warning "This function is not implemented for AARCH64 yet!"
|
||||
#if !defined(arch_aarch64)
|
||||
tc_lock_lock(&DYNINST_trace_lock);
|
||||
|
||||
@@ -446,7 +446,7 @@ cacheLookup(void* calculation)
|
||||
* bit 1: true if interpAsTarget
|
||||
* bit 2: true if interpAsReturnAddr
|
||||
**/
|
||||
//#define STACKDUMP
|
||||
// #define STACKDUMP
|
||||
void
|
||||
DYNINST_stopThread(void* pointAddr, void* callBackID, void* flags, void* calculation)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ map_region(void* addr, int len, int fd)
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, lastError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)(lpMessage), 0, NULL);
|
||||
(LPTSTR) (lpMessage), 0, NULL);
|
||||
fprintf(stderr, "VirtualAlloc failed in RTlib: %s\n", lpMessage);
|
||||
LocalFree((LPVOID) lpMessage);
|
||||
}
|
||||
|
||||
@@ -377,8 +377,8 @@ DYNINST_am_initial_thread(dyntid_t tid)
|
||||
# define UC_PC(x) x->uc_mcontext.uc_regs->gregs[32]
|
||||
# endif // power
|
||||
# elif defined(arch_aarch64)
|
||||
//#warning "UC_PC: in aarch64, pc is not directly accessable."
|
||||
// aarch64 pc is not one of 31 GPRs, but an independent reg
|
||||
// #warning "UC_PC: in aarch64, pc is not directly accessable."
|
||||
// aarch64 pc is not one of 31 GPRs, but an independent reg
|
||||
# define UC_PC(x) x->uc_mcontext.pc
|
||||
# endif // UC_PC
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ struct MemoryMapper RTmemoryMapper = { 0, 0, 0, 0, { { 0 } } };
|
||||
#endif
|
||||
extern FILE* stOut;
|
||||
|
||||
//#define DEBUG_MEM_EM
|
||||
// #define DEBUG_MEM_EM
|
||||
|
||||
unsigned long
|
||||
RTtranslateMemory(unsigned long input, unsigned long origAddr, unsigned long currAddr)
|
||||
|
||||
+10
-10
@@ -28,7 +28,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
//#warning "This file is not implemented yet!"
|
||||
// #warning "This file is not implemented yet!"
|
||||
|
||||
#if defined(DYNINST_RT_STATIC_LIB)
|
||||
|
||||
@@ -37,19 +37,19 @@
|
||||
void (*DYNINSTctors_addr)(void);
|
||||
void (*DYNINSTdtors_addr)(void);
|
||||
|
||||
//#if defined(MUTATEE64)
|
||||
// static const unsigned long long CTOR_LIST_TERM = 0x0000000000000000ULL;
|
||||
// static const unsigned long long CTOR_LIST_START = 0xffffffffffffffffULL;
|
||||
// static const unsigned long long DTOR_LIST_TERM = 0x0000000000000000ULL;
|
||||
// static const unsigned long long DTOR_LIST_START = 0xffffffffffffffffULL;
|
||||
//#else
|
||||
// #if defined(MUTATEE64)
|
||||
// static const unsigned long long CTOR_LIST_TERM = 0x0000000000000000ULL;
|
||||
// static const unsigned long long CTOR_LIST_START = 0xffffffffffffffffULL;
|
||||
// static const unsigned long long DTOR_LIST_TERM = 0x0000000000000000ULL;
|
||||
// static const unsigned long long DTOR_LIST_START = 0xffffffffffffffffULL;
|
||||
// #else
|
||||
/*
|
||||
static const unsigned CTOR_LIST_TERM = 0x00000000;
|
||||
static const unsigned CTOR_LIST_START = 0xffffffff;
|
||||
static const unsigned DTOR_LIST_TERM = 0x00000000;
|
||||
static const unsigned DTOR_LIST_START = 0xffffffff;
|
||||
*/
|
||||
//#endif
|
||||
// #endif
|
||||
|
||||
extern void
|
||||
DYNINSTBaseInit();
|
||||
@@ -68,14 +68,14 @@ DYNINSTBaseInit();
|
||||
void
|
||||
DYNINSTglobal_ctors_handler()
|
||||
{
|
||||
//#warning "This function is not implemented yet!"
|
||||
// #warning "This function is not implemented yet!"
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void
|
||||
DYNINSTglobal_dtors_handler()
|
||||
{
|
||||
//#warning "This function is not implemented yet!"
|
||||
// #warning "This function is not implemented yet!"
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ DYNINSTglobal_irel_handler()
|
||||
long (*ptr)(void) = 0;
|
||||
long result = 0;
|
||||
if(rel->info != 0x2a) continue;
|
||||
ptr = (funcptr)(*rel->offset);
|
||||
ptr = (funcptr) (*rel->offset);
|
||||
result = ptr();
|
||||
*(rel->offset) = result;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ extern int DYNINST_multithread_capable;
|
||||
|
||||
typedef dyninst_lock_t tc_lock_t;
|
||||
|
||||
#define DECLARE_TC_LOCK(l) tc_lock_t l = { 0, (dyntid_t) -1 }
|
||||
#define DECLARE_TC_LOCK(l) tc_lock_t l = { 0, (dyntid_t) - 1 }
|
||||
|
||||
int
|
||||
tc_lock_init(tc_lock_t*);
|
||||
|
||||
@@ -363,10 +363,10 @@ getStaticTrapMap(unsigned long addr, unsigned long* allocBase)
|
||||
|
||||
// see if the last section has been tagged with "DYNINST_REWRITE"
|
||||
numSections = peHdr->FileHeader.NumberOfSections;
|
||||
curSecn = *(PIMAGE_SECTION_HEADER)(((unsigned char*) peHdr) + sizeof(DWORD) +
|
||||
sizeof(IMAGE_FILE_HEADER) +
|
||||
peHdr->FileHeader.SizeOfOptionalHeader +
|
||||
sizeof(IMAGE_SECTION_HEADER) * (numSections - 1));
|
||||
curSecn = *(PIMAGE_SECTION_HEADER) (((unsigned char*) peHdr) + sizeof(DWORD) +
|
||||
sizeof(IMAGE_FILE_HEADER) +
|
||||
peHdr->FileHeader.SizeOfOptionalHeader +
|
||||
sizeof(IMAGE_SECTION_HEADER) * (numSections - 1));
|
||||
|
||||
// fprintf(stderr, "RTLIB: PE section header address = %lx\n", curSecn);
|
||||
// fprintf(stderr, "curSecn.chars = %lx %s[%d]\n",curSecn.Characteristics,
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
|
||||
# if !defined(ROCPROFSYS_CAUSAL_LABEL)
|
||||
/** @cond ROCPROFSYS_HIDDEN_DEFINES */
|
||||
# define ROCPROFSYS_CAUSAL_STR2(x) # x
|
||||
# define ROCPROFSYS_CAUSAL_STR2(x) #x
|
||||
# define ROCPROFSYS_CAUSAL_STR(x) ROCPROFSYS_CAUSAL_STR2(x)
|
||||
/** @endcond */
|
||||
/** Default label for a causal progress point */
|
||||
|
||||
@@ -165,7 +165,9 @@ inline void
|
||||
post_process()
|
||||
{}
|
||||
|
||||
inline void set_state(State) {}
|
||||
inline void
|
||||
set_state(State)
|
||||
{}
|
||||
#endif
|
||||
} // namespace amd_smi
|
||||
} // namespace rocprofsys
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ struct backtrace : comp::empty_base
|
||||
backtrace(const backtrace&) = default;
|
||||
backtrace(backtrace&&) noexcept = default;
|
||||
|
||||
backtrace& operator=(const backtrace&) = default;
|
||||
backtrace& operator=(const backtrace&) = default;
|
||||
backtrace& operator=(backtrace&&) noexcept = default;
|
||||
|
||||
void sample(int = -1);
|
||||
|
||||
@@ -82,13 +82,13 @@ auto speedup_dist = []() {
|
||||
size_t _n = std::max<size_t>(1, 100 / speedup_divisions);
|
||||
std::vector<uint16_t> _v(_n, uint16_t{ 0 });
|
||||
std::generate(_v.begin(), _v.end(),
|
||||
[_value = 0]() mutable { return (_value += speedup_divisions); });
|
||||
[_value = 0]() mutable { return (_value += speedup_divisions); });
|
||||
// approximately 25% of bins should be zero speedup
|
||||
size_t _nzero = std::ceil(_v.size() / 4.0);
|
||||
_v.resize(_v.size() + _nzero, 0);
|
||||
std::sort(_v.begin(), _v.end());
|
||||
ROCPROFSYS_CI_THROW(_v.back() > 100, "Error! last value is too large: %i\n",
|
||||
(int) _v.back());
|
||||
(int) _v.back());
|
||||
return _v;
|
||||
}();
|
||||
|
||||
@@ -899,7 +899,7 @@ get_line_info(uintptr_t _addr, bool _include_discarded)
|
||||
// make sure the address is in the coarse grained mapped regions
|
||||
// before performing an exhaustive search
|
||||
bool _is_mapped = std::find_if(litr.mappings.begin(), litr.mappings.end(),
|
||||
[_addr](const auto& mitr) {
|
||||
[_addr](const auto& mitr) {
|
||||
return address_range_t{ mitr.load_address,
|
||||
mitr.last_address }
|
||||
.contains(_addr);
|
||||
@@ -939,7 +939,7 @@ get_line_info(uintptr_t _addr, bool _include_discarded)
|
||||
if(!_ipaddr.contains(itr.ipaddr()))
|
||||
ROCPROFSYS_THROW(
|
||||
"Error! debug line info ipaddr (%s) is not contained in "
|
||||
"symbol ipaddr (%s)",
|
||||
"symbol ipaddr (%s)",
|
||||
as_hex(itr.ipaddr()).c_str(), as_hex(_ipaddr).c_str());
|
||||
if(itr.ipaddr().contains(_addr)) _debug_data.emplace_back(itr);
|
||||
}
|
||||
|
||||
@@ -462,7 +462,8 @@ sampling_signals()
|
||||
} // namespace
|
||||
|
||||
template <typename ScopeT>
|
||||
void pause(ScopeT)
|
||||
void
|
||||
pause(ScopeT)
|
||||
{
|
||||
static_assert(
|
||||
tim::is_one_of<ScopeT,
|
||||
@@ -501,7 +502,8 @@ void pause(ScopeT)
|
||||
}
|
||||
|
||||
template <typename ScopeT>
|
||||
void resume(ScopeT)
|
||||
void
|
||||
resume(ScopeT)
|
||||
{
|
||||
static_assert(
|
||||
tim::is_one_of<ScopeT,
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ struct backtrace : comp::empty_base
|
||||
backtrace(const backtrace&) = default;
|
||||
backtrace(backtrace&&) noexcept = default;
|
||||
|
||||
backtrace& operator=(const backtrace&) = default;
|
||||
backtrace& operator=(const backtrace&) = default;
|
||||
backtrace& operator=(backtrace&&) noexcept = default;
|
||||
|
||||
static std::vector<entry_type> filter_and_patch(const std::vector<entry_type>&);
|
||||
|
||||
+2
-1
@@ -148,7 +148,8 @@ backtrace_metrics::stop()
|
||||
namespace
|
||||
{
|
||||
template <typename... Tp>
|
||||
auto get_enabled(tim::type_list<Tp...>)
|
||||
auto
|
||||
get_enabled(tim::type_list<Tp...>)
|
||||
{
|
||||
constexpr size_t N = sizeof...(Tp);
|
||||
auto _v = std::bitset<N>{};
|
||||
|
||||
+5
-3
@@ -77,7 +77,7 @@ struct backtrace_metrics : comp::empty_base
|
||||
backtrace_metrics(const backtrace_metrics&) = default;
|
||||
backtrace_metrics(backtrace_metrics&&) noexcept = default;
|
||||
|
||||
backtrace_metrics& operator=(const backtrace_metrics&) = default;
|
||||
backtrace_metrics& operator=(const backtrace_metrics&) = default;
|
||||
backtrace_metrics& operator=(backtrace_metrics&&) noexcept = default;
|
||||
|
||||
static void configure(bool, int64_t _tid = threading::get_id());
|
||||
@@ -140,7 +140,8 @@ backtrace_metrics::get_valid(type_list<Tp>, valid_array_t _valid)
|
||||
}
|
||||
|
||||
template <typename Tp>
|
||||
bool backtrace_metrics::operator()(type_list<Tp>) const
|
||||
bool
|
||||
backtrace_metrics::operator()(type_list<Tp>) const
|
||||
{
|
||||
static_assert(!concepts::is_type_listing<Tp>::value,
|
||||
"Error! invalid call with tuple");
|
||||
@@ -157,7 +158,8 @@ backtrace_metrics::get_valid(Tp, valid_array_t _valid)
|
||||
}
|
||||
|
||||
template <typename Tp>
|
||||
bool backtrace_metrics::operator()(Tp) const
|
||||
bool
|
||||
backtrace_metrics::operator()(Tp) const
|
||||
{
|
||||
return (*this)(type_list<Tp>{});
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ struct backtrace_timestamp : comp::empty_base
|
||||
backtrace_timestamp(const backtrace_timestamp&) = default;
|
||||
backtrace_timestamp(backtrace_timestamp&&) noexcept = default;
|
||||
|
||||
backtrace_timestamp& operator=(const backtrace_timestamp&) = default;
|
||||
backtrace_timestamp& operator=(const backtrace_timestamp&) = default;
|
||||
backtrace_timestamp& operator=(backtrace_timestamp&&) noexcept = default;
|
||||
|
||||
bool operator<(const backtrace_timestamp& rhs) const;
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ struct callchain : comp::empty_base
|
||||
callchain(const callchain&) = default;
|
||||
callchain(callchain&&) noexcept = default;
|
||||
|
||||
callchain& operator=(const callchain&) = default;
|
||||
callchain& operator=(const callchain&) = default;
|
||||
callchain& operator=(callchain&&) noexcept = default;
|
||||
|
||||
static std::vector<ts_entry_vec_t> filter_and_patch(
|
||||
|
||||
@@ -60,7 +60,8 @@ using cpu_data_tuple_t = std::tuple<size_t, int64_t, int64_t, int64_t, int64_t,
|
||||
std::deque<cpu_data_tuple_t> data = {};
|
||||
|
||||
template <typename... Types>
|
||||
void init_perfetto_counter_tracks(type_list<Types...>)
|
||||
void
|
||||
init_perfetto_counter_tracks(type_list<Types...>)
|
||||
{
|
||||
(perfetto_counter_track<Types>::init(), ...);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ struct ompt : comp::base<ompt, void>
|
||||
ompt(const ompt&) = default;
|
||||
ompt(ompt&&) noexcept = default;
|
||||
|
||||
ompt& operator=(const ompt&) = default;
|
||||
ompt& operator=(const ompt&) = default;
|
||||
ompt& operator=(ompt&&) noexcept = default;
|
||||
|
||||
template <typename... Args>
|
||||
|
||||
@@ -178,8 +178,8 @@ perf_event::open(struct perf_event_attr& _pe, pid_t _pid, int _cpu)
|
||||
|
||||
ROCPROFSYS_RETURN_ERROR_MSG(
|
||||
true, "Failed to open perf event. Consider tweaking "
|
||||
<< path << " to 2 or less "
|
||||
<< "(current value is " << value << "), "
|
||||
<< path << " to 2 or less " << "(current value is " << value
|
||||
<< "), "
|
||||
<< "or run rocprof-sys as a privileged user (with CAP_SYS_ADMIN).");
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ struct perf_event
|
||||
/// Move assignment is supported
|
||||
perf_event& operator=(perf_event&& other) noexcept;
|
||||
|
||||
perf_event(const perf_event&) = delete;
|
||||
perf_event(const perf_event&) = delete;
|
||||
perf_event& operator=(const perf_event&) = delete;
|
||||
|
||||
/// Open a perf_event file using the given options structure
|
||||
@@ -108,15 +108,15 @@ struct perf_event
|
||||
{
|
||||
friend class perf_event::iterator;
|
||||
|
||||
record() = default;
|
||||
~record() = default;
|
||||
record(const record&) = default;
|
||||
record(record&&) noexcept = default;
|
||||
record& operator=(const record&) = default;
|
||||
record() = default;
|
||||
~record() = default;
|
||||
record(const record&) = default;
|
||||
record(record&&) noexcept = default;
|
||||
record& operator=(const record&) = default;
|
||||
record& operator=(record&&) noexcept = default;
|
||||
|
||||
bool is_valid() const { return (m_source != nullptr && m_header != nullptr); }
|
||||
operator bool() const { return is_valid(); }
|
||||
operator bool() const { return is_valid(); }
|
||||
|
||||
record_type get_type() const { return static_cast<record_type>(m_header->type); }
|
||||
|
||||
|
||||
@@ -1085,18 +1085,18 @@ tool_init(rocprofiler_client_finalize_t fini_func, void* user_data)
|
||||
|
||||
for(auto itr : {
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_CORE_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_IMAGE_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_FINALIZE_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_RCCL_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_AMD_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_IMAGE_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HSA_FINALIZE_EXT_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HIP_RUNTIME_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_HIP_COMPILER_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_MARKER_CORE_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_RCCL_API,
|
||||
#if(ROCPROFILER_VERSION >= 600)
|
||||
ROCPROFILER_CALLBACK_TRACING_ROCDECODE_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_ROCDECODE_API,
|
||||
#endif
|
||||
#if(ROCPROFILER_VERSION >= 700)
|
||||
ROCPROFILER_CALLBACK_TRACING_ROCJPEG_API,
|
||||
ROCPROFILER_CALLBACK_TRACING_ROCJPEG_API,
|
||||
#endif
|
||||
})
|
||||
{
|
||||
|
||||
+4
-4
@@ -93,11 +93,11 @@ struct counter_storage
|
||||
counter_storage(const client_data* _tool_data, uint64_t _devid, size_t _idx,
|
||||
std::string_view _name);
|
||||
|
||||
~counter_storage() = default;
|
||||
counter_storage(const counter_storage&) = delete;
|
||||
counter_storage(counter_storage&&) = default;
|
||||
~counter_storage() = default;
|
||||
counter_storage(const counter_storage&) = delete;
|
||||
counter_storage(counter_storage&&) = default;
|
||||
counter_storage& operator=(const counter_storage&) = delete;
|
||||
counter_storage& operator=(counter_storage&&) = default;
|
||||
counter_storage& operator=(counter_storage&&) = default;
|
||||
|
||||
friend bool operator<(const counter_storage& lhs, const counter_storage& rhs)
|
||||
{
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ struct rocprofiler_tool_counter_info_t : rocprofiler_counter_info_v0_t
|
||||
rocprofiler_tool_counter_info_t(rocprofiler_tool_counter_info_t&&) noexcept = default;
|
||||
rocprofiler_tool_counter_info_t& operator=(const rocprofiler_tool_counter_info_t&) =
|
||||
default;
|
||||
rocprofiler_tool_counter_info_t& operator =(
|
||||
rocprofiler_tool_counter_info_t& operator=(
|
||||
rocprofiler_tool_counter_info_t&&) noexcept = default;
|
||||
|
||||
rocprofiler_agent_id_t agent_id = {};
|
||||
|
||||
@@ -261,7 +261,7 @@ struct thread_data<std::optional<Tp>, Tag, MaxThreads>
|
||||
thread_data(const thread_data&) = default;
|
||||
thread_data(thread_data&&) noexcept = default;
|
||||
|
||||
thread_data& operator=(const thread_data&) = default;
|
||||
thread_data& operator=(const thread_data&) = default;
|
||||
thread_data& operator=(thread_data&&) noexcept = default;
|
||||
|
||||
static unique_ptr_t<this_type>& instance();
|
||||
@@ -432,7 +432,7 @@ struct thread_data<identity<Tp>, Tag, MaxThreads>
|
||||
thread_data(const thread_data&) = default;
|
||||
thread_data(thread_data&&) noexcept = default;
|
||||
|
||||
thread_data& operator=(const thread_data&) = default;
|
||||
thread_data& operator=(const thread_data&) = default;
|
||||
thread_data& operator=(thread_data&&) noexcept = default;
|
||||
|
||||
static unique_ptr_t<this_type>& instance();
|
||||
|
||||
@@ -93,7 +93,7 @@ struct thread_info
|
||||
thread_info(thread_info&&) = default;
|
||||
|
||||
thread_info& operator=(const thread_info&) = delete;
|
||||
thread_info& operator=(thread_info&&) = default;
|
||||
thread_info& operator=(thread_info&&) = default;
|
||||
|
||||
static void set_start(uint64_t, bool _force = false);
|
||||
static void set_stop(uint64_t);
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
# define OMPI_PREDEFINED_GLOBAL(type, global) \
|
||||
(static_cast<type>(static_cast<void*>(&(global))))
|
||||
# else
|
||||
# define OMPI_PREDEFINED_GLOBAL(type, global) ((type)((void*) &(global)))
|
||||
# define OMPI_PREDEFINED_GLOBAL(type, global) ((type) ((void*) &(global)))
|
||||
# endif
|
||||
#else
|
||||
# define OMPI_PREDEFINED_GLOBAL(type, global) ((type) & (global))
|
||||
@@ -718,7 +718,7 @@ extern "C"
|
||||
#if(OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
|
||||
MPI_COMBINER_HVECTOR_INTEGER,
|
||||
#else
|
||||
OMPI_WAS_MPI_COMBINER_HVECTOR_INTEGER, /* preserve ABI compatibility */
|
||||
OMPI_WAS_MPI_COMBINER_HVECTOR_INTEGER, /* preserve ABI compatibility */
|
||||
#endif
|
||||
MPI_COMBINER_HVECTOR,
|
||||
MPI_COMBINER_INDEXED,
|
||||
@@ -732,7 +732,7 @@ extern "C"
|
||||
#if(OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
|
||||
MPI_COMBINER_STRUCT_INTEGER,
|
||||
#else
|
||||
OMPI_WAS_MPI_COMBINER_STRUCT_INTEGER, /* preserve ABI compatibility */
|
||||
OMPI_WAS_MPI_COMBINER_STRUCT_INTEGER, /* preserve ABI compatibility */
|
||||
#endif
|
||||
MPI_COMBINER_STRUCT,
|
||||
MPI_COMBINER_SUBARRAY,
|
||||
@@ -882,7 +882,7 @@ extern "C"
|
||||
/*
|
||||
* Special MPI_T handles
|
||||
*/
|
||||
#define MPI_T_PVAR_ALL_HANDLES ((MPI_T_pvar_handle) -1)
|
||||
#define MPI_T_PVAR_ALL_HANDLES ((MPI_T_pvar_handle) - 1)
|
||||
#define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle) 0)
|
||||
#define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session) 0)
|
||||
#define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle) 0)
|
||||
@@ -1284,8 +1284,8 @@ extern "C"
|
||||
#define MPI_TYPECLASS_COMPLEX 3
|
||||
|
||||
/* Aint helper macros (MPI-3.1) */
|
||||
#define MPI_Aint_add(base, disp) ((MPI_Aint)((char*) (base) + (disp)))
|
||||
#define MPI_Aint_diff(addr1, addr2) ((MPI_Aint)((char*) (addr1) - (char*) (addr2)))
|
||||
#define MPI_Aint_add(base, disp) ((MPI_Aint) ((char*) (base) + (disp)))
|
||||
#define MPI_Aint_diff(addr1, addr2) ((MPI_Aint) ((char*) (addr1) - (char*) (addr2)))
|
||||
#define PMPI_Aint_add(base, disp) MPI_Aint_add(base, disp)
|
||||
#define PMPI_Aint_diff(addr1, addr2) MPI_Aint_diff(addr1, addr2)
|
||||
|
||||
|
||||
+4
-4
@@ -73,7 +73,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef _STRINGIFY
|
||||
# define _STRINGIFY_HELPER(x) # x
|
||||
# define _STRINGIFY_HELPER(x) #x
|
||||
# define _STRINGIFY(x) _STRINGIFY_HELPER(x)
|
||||
#endif
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
# endif
|
||||
/* patch number is a decimal build date: YYYYMMDD */
|
||||
# define PLATFORM_COMPILER_VERSION_INT(maj, min, pat) \
|
||||
(((((maj) *10) | (min)) << 20) | \
|
||||
(((((maj) * 10) | (min)) << 20) | \
|
||||
((pat) < _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE \
|
||||
? _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE \
|
||||
: ((pat) -_PLATFORM_COMPILER_INTEL_MIN_BUILDDATE)))
|
||||
: ((pat) - _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE)))
|
||||
# define PLATFORM_COMPILER_VERSION \
|
||||
PLATFORM_COMPILER_VERSION_INT(__INTEL_COMPILER / 10, __INTEL_COMPILER / 100, \
|
||||
_PLATFORM_INTEL_COMPILER_BUILD_DATE)
|
||||
@@ -207,7 +207,7 @@
|
||||
# endif
|
||||
|
||||
# define PLATFORM_COMPILER_VERSION_INT(maj, min, pat) \
|
||||
(((maj) *10000000) + ((min) *100000) + (90000) + (pat))
|
||||
(((maj) * 10000000) + ((min) * 100000) + (90000) + (pat))
|
||||
/* 90000 = official ver, 80000 = customer special ver, 60000 = field test ver */
|
||||
|
||||
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
|
||||
+2
-2
@@ -230,8 +230,8 @@ struct annotate<perfetto_event_context_t, Tp>
|
||||
private:
|
||||
// If the component has a annotate(...) member function
|
||||
template <typename T>
|
||||
static auto sfinae(T& obj, int, perfetto_event_context_t& _ctx)
|
||||
-> decltype(obj.annotate(_ctx))
|
||||
static auto sfinae(T& obj, int,
|
||||
perfetto_event_context_t& _ctx) -> decltype(obj.annotate(_ctx))
|
||||
{
|
||||
static_assert(std::is_same<T, Tp>::value, "Error T != Tp");
|
||||
return obj.annotate(_ctx);
|
||||
|
||||
@@ -137,7 +137,7 @@ ensure_ci_timeout_backtrace(double _ci_timeout_seconds,
|
||||
ROCPROFSYS_WARNING_F(
|
||||
0,
|
||||
"pthread_kill(%zu, %i) failed. executing generic "
|
||||
"kill(%i, %i)...\n",
|
||||
"kill(%i, %i)...\n",
|
||||
_handle, timeout_signal_v, process::get_id(), timeout_signal_v);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user