@@ -191,8 +191,8 @@ bool CpuScalingEnabled(int num_cpus) {
191191 // running on Linux, so we silently ignore all the read errors.
192192 std::string res;
193193 for (int cpu = 0 ; cpu < num_cpus; ++cpu) {
194- std::string governor_file =
195- StrCat ( " /sys/devices/system/cpu/cpu " , cpu, " /cpufreq/scaling_governor" );
194+ std::string governor_file = StringCat ( " /sys/devices/system/cpu/cpu " , cpu,
195+ " /cpufreq/scaling_governor" );
196196 if (ReadFromFile (governor_file, &res) && res != " performance" ) return true ;
197197 }
198198#endif
@@ -225,8 +225,8 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesFromKVFS() {
225225 int Idx = 0 ;
226226 while (true ) {
227227 CPUInfo::CacheInfo info;
228- std::string FPath = StrCat (dir, " index" , Idx++, " /" );
229- std::ifstream f (StrCat (FPath, " size" ).c_str ());
228+ std::string FPath = StringCat (dir, " index" , Idx++, " /" );
229+ std::ifstream f (StringCat (FPath, " size" ).c_str ());
230230 if (!f.is_open ()) break ;
231231 std::string suffix;
232232 f >> info.size ;
@@ -242,12 +242,12 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesFromKVFS() {
242242 else if (suffix == " K" )
243243 info.size *= 1000 ;
244244 }
245- if (!ReadFromFile (StrCat (FPath, " type" ), &info.type ))
245+ if (!ReadFromFile (StringCat (FPath, " type" ), &info.type ))
246246 PrintErrorAndDie (" Failed to read from file " , FPath, " type" );
247- if (!ReadFromFile (StrCat (FPath, " level" ), &info.level ))
247+ if (!ReadFromFile (StringCat (FPath, " level" ), &info.level ))
248248 PrintErrorAndDie (" Failed to read from file " , FPath, " level" );
249249 std::string map_str;
250- if (!ReadFromFile (StrCat (FPath, " shared_cpu_map" ), &map_str))
250+ if (!ReadFromFile (StringCat (FPath, " shared_cpu_map" ), &map_str))
251251 PrintErrorAndDie (" Failed to read from file " , FPath, " shared_cpu_map" );
252252 info.num_sharing = CountSetBitsInCPUMap (map_str);
253253 res.push_back (info);
0 commit comments