Cherry-pick CL 1250286 from SC stg.

HSA Finalizer: Add dumping of code object, ISA and executable to loader.

This is controlled by loader options -dump-all, -dump-isa, -dump-code, -dump-exec

The options can now also be set with env variable LOADER_OPTIONS_APPEND.

Added tests to finalizer_offline

Testing: smoke, dumping on hardware

Reviewed by: Konstantin Zhuravlyov

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1255351]
Ta zmiana jest zawarta w:
%! (template.HTML=Nikolay Haustov [TEXT])złożyło 2016-04-07 06:01:20 -05:00
1 rodzic 823c254d61
złożenie a795909bca
5 plików zmienionych
+177

Żadne pliki nie pasują do Twojego wyszukiwania

+16
Wyświetl plik
@@ -47,6 +47,7 @@
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <sstream>
#ifdef _WIN32
#include <Windows.h>
#include <io.h>
@@ -1029,5 +1030,20 @@ void ltrim(std::string &str) {
str.erase(str.begin(), std::find_if(str.begin(), str.end(), IsNotSpace));
}
std::string DumpFileName(const std::string& dir, const char* prefix, const char* ext, unsigned n, unsigned i)
{
std::ostringstream ss;
if (!dir.empty()) {
ss << dir << "/";
}
ss <<
prefix <<
std::setfill('0') << std::setw(3) << n;
if (i) { ss << "_" << i; }
if (ext) { ss << "." << ext; }
return ss.str();
}
}
}