diff --git a/CMakeLists.txt b/CMakeLists.txt
index b43fecd8..2961cef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,6 +133,7 @@ set(SOURCE_FILES
src/monitor/scope_monitor.cpp
src/monitor/threaded_monitor.cpp
src/monitor/tracepoint_monitor.cpp
+ src/monitor/bio_monitor.cpp
src/process_controller.cpp
src/perf/event_provider.cpp
@@ -148,6 +149,7 @@ set(SOURCE_FILES
src/perf/time/converter.cpp src/perf/time/reader.cpp
src/perf/tracepoint/format.cpp
src/perf/tracepoint/writer.cpp
+ src/perf/bio/event_cacher.cpp
src/time/time.cpp
diff --git a/include/lo2s/config.hpp b/include/lo2s/config.hpp
index cbc2d053..7ab8ff1d 100644
--- a/include/lo2s/config.hpp
+++ b/include/lo2s/config.hpp
@@ -90,6 +90,9 @@ struct Config
clockid_t clockid;
// x86_energy
bool use_x86_energy;
+ // block I/O
+ bool use_block_io;
+ size_t block_io_cache_size;
};
const Config& config();
diff --git a/include/lo2s/measurement_scope.hpp b/include/lo2s/measurement_scope.hpp
index dedd757a..4add1ef6 100644
--- a/include/lo2s/measurement_scope.hpp
+++ b/include/lo2s/measurement_scope.hpp
@@ -30,6 +30,7 @@ enum class MeasurementScopeType
GROUP_METRIC,
USERSPACE_METRIC,
SWITCH,
+ BIO,
UNKNOWN
};
@@ -66,6 +67,11 @@ struct MeasurementScope
return { MeasurementScopeType::SWITCH, s };
}
+ static MeasurementScope bio(ExecutionScope s)
+ {
+ return { MeasurementScopeType::BIO, s };
+ }
+
friend bool operator==(const MeasurementScope& lhs, const MeasurementScope& rhs)
{
return (lhs.scope == rhs.scope) && lhs.type == rhs.type;
@@ -94,6 +100,8 @@ struct MeasurementScope
return fmt::format("samples for {}", scope.name());
case MeasurementScopeType::SWITCH:
return fmt::format("context switches for {}", scope.name());
+ case MeasurementScopeType::BIO:
+ return fmt::format("block layer I/O events for {}", scope.name());
default:
throw new std::runtime_error("Unknown ExecutionScopeType!");
}
diff --git a/include/lo2s/monitor/bio_monitor.hpp b/include/lo2s/monitor/bio_monitor.hpp
new file mode 100644
index 00000000..081f4973
--- /dev/null
+++ b/include/lo2s/monitor/bio_monitor.hpp
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the lo2s software.
+ * Linux OTF2 sampling
+ *
+ * Copyright (c) 2017,
+ * Technische Universitaet Dresden, Germany
+ *
+ * lo2s is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * lo2s is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with lo2s. If not, see .
+ */
+
+#pragma once
+
+#include
+#include
+
+#include
+#include
+
+#include