@@ -49,8 +49,7 @@ LockCacheItem::LockCacheItem(const std::string &Path)
4949
5050LockCacheItem::~LockCacheItem () {
5151 if (Owned && std::remove (FileName.c_str ()))
52- PersistentDeviceCodeCache::trace (" Failed to release lock file: " +
53- FileName);
52+ PersistentDeviceCodeCache::trace (" Failed to release lock file: " , FileName);
5453}
5554
5655// Returns true if the specified format is either SPIRV or a native binary.
@@ -335,7 +334,7 @@ void PersistentDeviceCodeCache::evictItemsFromCache(
335334 throw sycl::exception (make_error_code (errc::runtime),
336335 " Failed to evict cache entry: " + FileName);
337336 } else {
338- PersistentDeviceCodeCache::trace (" File removed: " + FileName);
337+ PersistentDeviceCodeCache::trace (" File removed: " , FileName);
339338 CurrCacheSize -= FileSize;
340339 }
341340 };
@@ -475,7 +474,7 @@ void PersistentDeviceCodeCache::putItemToDisc(
475474 if (Lock.isOwned ()) {
476475 std::string FullFileName = FileName + " .bin" ;
477476 writeBinaryDataToFile (FullFileName, BinaryData[DeviceIndex]);
478- trace (" device binary has been cached: " + FullFileName);
477+ trace (" device binary has been cached: " , FullFileName);
479478 writeSourceItem (FileName + " .src" , Devices[DeviceIndex], SortedImgs,
480479 SpecConsts, BuildOptionsString);
481480
@@ -485,7 +484,7 @@ void PersistentDeviceCodeCache::putItemToDisc(
485484
486485 saveCurrentTimeInAFile (FileName + CacheEntryAccessTimeSuffix);
487486 } else {
488- PersistentDeviceCodeCache::trace (" cache lock not owned " + FileName);
487+ PersistentDeviceCodeCache::trace (" cache lock not owned " , FileName);
489488 }
490489 } catch (std::exception &e) {
491490 PersistentDeviceCodeCache::trace (
@@ -536,13 +535,13 @@ void PersistentDeviceCodeCache::putCompiledKernelToDisc(
536535 std::string FullFileName = FileName + " .bin" ;
537536 writeBinaryDataToFile (FullFileName, BinaryData[DeviceIndex]);
538537 PersistentDeviceCodeCache::trace_KernelCompiler (
539- " binary has been cached: " + FullFileName);
538+ " binary has been cached: " , FullFileName);
540539
541540 TotalSize += getFileSize (FullFileName);
542541 saveCurrentTimeInAFile (FileName + CacheEntryAccessTimeSuffix);
543542 } else {
544- PersistentDeviceCodeCache::trace_KernelCompiler (
545- " cache lock not owned " + FileName);
543+ PersistentDeviceCodeCache::trace_KernelCompiler (" cache lock not owned " ,
544+ FileName);
546545 }
547546 } catch (std::exception &e) {
548547 PersistentDeviceCodeCache::trace_KernelCompiler (
@@ -612,7 +611,7 @@ std::vector<std::vector<char>> PersistentDeviceCodeCache::getItemFromDisc(
612611 if (Binaries[DeviceIndex].empty ())
613612 return {};
614613 }
615- PersistentDeviceCodeCache::trace (" using cached device binary: " + FileNames);
614+ PersistentDeviceCodeCache::trace (" using cached device binary: " , FileNames);
616615 return Binaries;
617616}
618617
@@ -660,7 +659,7 @@ PersistentDeviceCodeCache::getCompiledKernelFromDisc(
660659 if (Binaries[DeviceIndex].empty ())
661660 return {};
662661 }
663- PersistentDeviceCodeCache::trace_KernelCompiler (" using cached binary: " +
662+ PersistentDeviceCodeCache::trace_KernelCompiler (" using cached binary: " ,
664663 FileNames);
665664 return Binaries;
666665}
@@ -691,7 +690,7 @@ void PersistentDeviceCodeCache::writeBinaryDataToFile(
691690 FileStream.write ((char *)&Size, sizeof (Size));
692691 FileStream.write (Data.data (), Size);
693692 if (FileStream.fail ())
694- trace (" Failed to write to binary file " + FileName);
693+ trace (" Failed to write to binary file " , FileName);
695694}
696695
697696/* Read built binary from persistent cache. Each persistent cache file contains
@@ -708,7 +707,7 @@ PersistentDeviceCodeCache::readBinaryDataFromFile(const std::string &FileName) {
708707 size_t NumBinaries = 0 ;
709708 FileStream.read ((char *)&NumBinaries, sizeof (NumBinaries));
710709 if (FileStream.fail ()) {
711- trace (" Failed to read number of binaries from " + FileName);
710+ trace (" Failed to read number of binaries from " , FileName);
712711 return {};
713712 }
714713 // Even in the old implementation we could only put a single binary to the
@@ -723,7 +722,7 @@ PersistentDeviceCodeCache::readBinaryDataFromFile(const std::string &FileName) {
723722 FileStream.close ();
724723
725724 if (FileStream.fail ()) {
726- trace (" Failed to read binary file from " + FileName);
725+ trace (" Failed to read binary file from " , FileName);
727726 return {};
728727 }
729728
@@ -763,7 +762,7 @@ void PersistentDeviceCodeCache::writeSourceItem(
763762 FileStream.close ();
764763
765764 if (FileStream.fail ()) {
766- trace (" Failed to write source file to " + FileName);
765+ trace (" Failed to write source file to " , FileName);
767766 }
768767}
769768
@@ -811,7 +810,7 @@ bool PersistentDeviceCodeCache::isCacheItemSrcEqual(
811810 FileStream.close ();
812811
813812 if (FileStream.fail ()) {
814- trace (" Failed to read source file from " + FileName);
813+ trace (" Failed to read source file from " , FileName);
815814 }
816815
817816 return true ;
0 commit comments