Skip to content

Commit

Permalink
fix build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tessa Todorowski committed Aug 6, 2024
1 parent ef26807 commit 820daaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
13 changes: 6 additions & 7 deletions include/lo2s/perf/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,17 @@
#include <lo2s/perf/tracepoint/format.hpp>
#include <lo2s/perf/util.hpp>

#ifndef USE_HW_BREAKPOINT_COMPAT
extern "C"
{
#include <linux/hw_breakpoint.h>
#include <sys/ioctl.h>
}

#ifndef USE_HW_BREAKPOINT_COMPAT
#include <linux/hw_breakpoint.h>
#else
extern "C"
{
#include <sys/types.h>
#include <sys/wait.h>
}
#endif
}

namespace lo2s
{
Expand Down Expand Up @@ -123,7 +121,8 @@ class Event
unit_ = unit;
}

void set_clock_attrs(const bool& use_clockid, const clockid_t& clockid)
void set_clock_attrs([[maybe_unused]] const bool& use_clockid,
[[maybe_unused]] const clockid_t& clockid)
{
#ifndef USE_HW_BREAKPOINT_COMPAT
attr_.use_clockid = use_clockid;
Expand Down
15 changes: 4 additions & 11 deletions src/perf/event_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ extern "C"

namespace
{
#define PERF_EVENT(name, type, id) { (name), (type), (id) }
#define PERF_EVENT(name, type, id) \
{ \
(name), (type), (id) \
}
#define PERF_EVENT_HW(name, id) PERF_EVENT(name, PERF_TYPE_HARDWARE, PERF_COUNT_HW_##id)
#define PERF_EVENT_SW(name, id) PERF_EVENT(name, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_##id)

Expand Down Expand Up @@ -136,16 +139,6 @@ inline constexpr std::size_t array_size(T (&)[N])
{
return N;
}

constexpr std::uint64_t operator"" _u64(unsigned long long int lit)
{
return static_cast<std::uint64_t>(lit);
}

constexpr std::uint64_t bit(int bitnumber)
{
return static_cast<std::uint64_t>(1_u64 << bitnumber);
}
} // namespace

namespace lo2s
Expand Down

0 comments on commit 820daaa

Please sign in to comment.