File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
llvm/tools/llvm-exegesis/lib/RISCV Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -60,18 +60,19 @@ class RISCVCpuCyclesCounter : public pfm::CounterGroup {
6060
6161RISCVCpuCyclesCounter::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;
You can’t perform that action at this time.
0 commit comments