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 Sep 17, 2024
1 parent 4e0b8e2 commit 7798068
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/lo2s/perf/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class EventGuard
EventGuard(Event& ev, std::variant<Cpu, Thread> location, int group_fd, int cgroup_fd);

EventGuard() = delete;
EventGuard(EventGuard&) = delete;
EventGuard(const EventGuard& other) = delete;
EventGuard& operator=(const EventGuard&) = delete;

EventGuard(EventGuard&& other)
Expand Down
4 changes: 2 additions & 2 deletions include/lo2s/perf/io_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ struct IoReaderIdentity
class IoReader : public PullReader
{
public:
IoReader(IoReaderIdentity identity) : identity_(identity)
IoReader(IoReaderIdentity identity) : identity_(identity), event_(std::nullopt)
{
try
{
event_ = std::move(identity_.tracepoint.open(identity.cpu));
event_ = identity_.tracepoint.open(identity.cpu);
}
catch (const std::system_error& e)
{
Expand Down
2 changes: 1 addition & 1 deletion include/lo2s/perf/sample/reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Reader : public EventReader<T>
{
try
{
event_ = std::move(event.open(scope, config().cgroup_fd));
event_ = event.open(scope, config().cgroup_fd);
}
catch (const std::system_error& e)
{
Expand Down
6 changes: 3 additions & 3 deletions src/perf/counter/group/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Reader<T>::Reader(ExecutionScope scope, bool enable_on_exec)
{
try
{
counter_leader_ = std::move(
counter_collection_.leader.open_as_group_leader(scope, config().cgroup_fd));
counter_leader_ =
counter_collection_.leader.open_as_group_leader(scope, config().cgroup_fd);
}
catch (const std::system_error& e)
{
Expand Down Expand Up @@ -95,7 +95,7 @@ Reader<T>::Reader(ExecutionScope scope, bool enable_on_exec)
{
if (counter_ev.is_available_in(scope))
{
std::optional<EventGuard> counter;
std::optional<EventGuard> counter = std::nullopt;
counter_ev.mut_attr().exclude_kernel = counter_collection_.leader.attr().exclude_kernel;
do
{
Expand Down
6 changes: 3 additions & 3 deletions src/perf/counter/userspace/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ Reader<T>::Reader(ExecutionScope scope)

for (auto& event : counter_collection_.counters)
{
std::optional<EventGuard> counter;
std::optional<EventGuard> counter = std::nullopt;

try
{
counter = std::move(event.open(scope));
counter = event.open(scope);
counters_.emplace_back(std::move(counter.value()));
}
catch (const std::system_error& e)
Expand All @@ -82,7 +82,7 @@ Reader<T>::Reader(ExecutionScope scope)
event.mut_attr().exclude_kernel = 1;
perf_warn_paranoid();

counter = std::move(event.open(scope));
counter = event.open(scope);
}

if (!counter.value().is_valid())
Expand Down
2 changes: 1 addition & 1 deletion src/perf/time/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Reader::Reader()

try
{
ev_instance_ = std::move(event.open(Thread(0)));
ev_instance_ = event.open(Thread(0));

init_mmap(ev_instance_.value().get_fd());
ev_instance_.value().enable();
Expand Down

0 comments on commit 7798068

Please sign in to comment.