Skip to content

Commit 3f207a4

Browse files
Fix code format
1 parent b748089 commit 3f207a4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/tools/llvm-exegesis/lib/RISCV/RISCVCounters.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,19 @@ class RISCVCpuCyclesCounter : public pfm::CounterGroup {
6060

6161
RISCVCpuCyclesCounter::RISCVCpuCyclesCounter(pfm::PerfEvent &&Event)
6262
: CounterGroup(std::move(Event), {}) {
63-
#if defined(__riscv) && defined(__linux__)
63+
#if defined(__riscv) && defined(__linux__)
6464
char Value[2] = "0";
6565
int File = 0;
66-
std::error_code FileError = sys::fs::openFileForRead("/proc/sys/kernel/watchdog", File);
66+
std::error_code FileError =
67+
sys::fs::openFileForRead("/proc/sys/kernel/watchdog", File);
6768
sys::fs::file_t FileNative = sys::fs::convertFDToNativeFile(File);
6869
Expected<size_t> ReadBytes = sys::fs::readNativeFile(FileNative, Value);
6970

7071
if (FileError || !ReadBytes || strcmp(Value, "1") != 0) {
7172
report_fatal_error(
7273
"Please write 'sudo echo 1 > /proc/sys/kernel/perf_user_access'");
7374
}
74-
#endif
75+
#endif
7576
StartValue = getRISCVCpuCyclesCount();
7677
EndValue = getRISCVCpuCyclesCount();
7778
MeasurementCycles = EndValue - StartValue;

0 commit comments

Comments
 (0)