SWDEV-444112: Fixing plugins race condition

Change-Id: I0057d1ade4e1123b878489ff31851b25976217c6


[ROCm/rocprofiler commit: 6ed22f3d62]
Tento commit je obsažen v:
Giovanni LB
2024-02-01 14:11:31 -03:00
rodič 175f4e024e
revize bf90bc8fe8
3 změnil soubory, kde provedl 4 přidání a 6 odebrání
+1 -2
Zobrazit soubor
@@ -80,7 +80,6 @@ std::vector<std::string> GetCounterNames() {
return counters;
}
static std::string output_file_name;
class file_plugin_t {
private:
enum class output_type_t { COUNTER, TRACER, PC_SAMPLING };
@@ -109,7 +108,7 @@ class file_plugin_t {
if (fail()) return;
const char* output_dir = getenv("OUTPUT_PATH");
output_file_name = getenv("OUT_FILE_NAME") ? std::string(getenv("OUT_FILE_NAME")) : "";
std::string output_file_name = getenv("OUT_FILE_NAME") ? getenv("OUT_FILE_NAME") : "";
if (output_dir == nullptr && getenv("OUT_FILE_NAME") == nullptr) {
stream_.copyfmt(std::cout);