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 3601ca0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 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
2 changes: 1 addition & 1 deletion src/perf/counter/group/reader.cpp
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion src/perf/counter/userspace/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Reader<T>::Reader(ExecutionScope scope)

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

try
{
Expand Down

0 comments on commit 3601ca0

Please sign in to comment.