Skip to content

Commit

Permalink
hiding visibility of internal symbols (intel#67)
Browse files Browse the repository at this point in the history
* hiding visibility of internal symbols

* hiding visibility of internal symbols
  • Loading branch information
vladimir-tsymbal committed Jun 12, 2023
1 parent 3bf9f4f commit a292b76
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 195 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.49.8
0.49.9
7 changes: 6 additions & 1 deletion build_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ macro(RequirePythonInterp)
endmacro()

macro(SetCompilerFlags)
if(WIN32)
set(ADD_FLAGS " ")
else()
set(ADD_FLAGS " -fvisibility=hidden")
endif()
file(STRINGS "${PTI_CMAKE_MACRO_DIR}/../VERSION" PTI_VERSION)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPTI_VERSION=${PTI_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADD_FLAGS} -DPTI_VERSION=${PTI_VERSION}")
endmacro()

macro(SetBuildType)
Expand Down
2 changes: 1 addition & 1 deletion loader/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void AtExit() {
DisableProfiling();
}

extern "C" __declspec(dllexport)
extern "C" PTI_EXPORT
DWORD Init(void*) {
atexit(AtExit);
EnableProfiling();
Expand Down
15 changes: 3 additions & 12 deletions samples/cl_debug_info/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ static ClDebugInfoCollector* collector = nullptr;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./cl_debug_info[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {}

// Internal Tool Functionality ////////////////////////////////////////////////
Expand Down
15 changes: 3 additions & 12 deletions samples/cl_gpu_metrics/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./cl_gpu_metrics[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {}

// Internal Tool Functionality ////////////////////////////////////////////////
Expand Down
15 changes: 3 additions & 12 deletions samples/cl_gpu_query/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./cl_gpu_query[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {}

// Internal Tool Functionality ////////////////////////////////////////////////
Expand Down
15 changes: 3 additions & 12 deletions samples/cl_hot_functions/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./cl_hot_functions[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {}

// Internal Tool Functionality ////////////////////////////////////////////////
Expand Down
15 changes: 3 additions & 12 deletions samples/cl_hot_kernels/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./cl_hot_functions[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {}

// Internal Tool Functionality ////////////////////////////////////////////////
Expand Down
15 changes: 3 additions & 12 deletions samples/gpu_inst_count/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ static GpuInstCountCollector* collector = nullptr;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./gpu_inst_count[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZET_ENABLE_API_TRACING_EXP", "1");
utils::SetEnv("ZET_ENABLE_PROGRAM_INSTRUMENTATION", "1");
Expand Down
15 changes: 3 additions & 12 deletions samples/gpu_perfmon_read/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ static GpuPerfMonCollector* collector = nullptr;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./gpu_perfmon_read[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZET_ENABLE_API_TRACING_EXP", "1");
utils::SetEnv("ZET_ENABLE_PROGRAM_INSTRUMENTATION", "1");
Expand Down
15 changes: 3 additions & 12 deletions samples/ze_debug_info/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ static ZeDebugInfoCollector* collector = nullptr;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./ze_debug_info[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZE_ENABLE_TRACING_LAYER", "1");
}
Expand Down
15 changes: 3 additions & 12 deletions samples/ze_hot_functions/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./ze_hot_functions[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZE_ENABLE_TRACING_LAYER", "1");
}
Expand Down
15 changes: 3 additions & 12 deletions samples/ze_hot_kernels/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./ze_hot_kernels[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZE_ENABLE_TRACING_LAYER", "1");
}
Expand Down
15 changes: 3 additions & 12 deletions samples/ze_metric_query/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,19 @@ static std::chrono::steady_clock::time_point start;

// External Tool Interface ////////////////////////////////////////////////////

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void Usage() {
std::cout <<
"Usage: ./ze_metric_query[.exe] <application> <args>" <<
std::endl;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
int ParseArgs(int argc, char* argv[]) {
return 1;
}

extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
extern "C" PTI_EXPORT
void SetToolEnv() {
utils::SetEnv("ZE_ENABLE_TRACING_LAYER", "1");
utils::SetEnv("ZET_ENABLE_METRICS", "1");
Expand Down
Loading

0 comments on commit a292b76

Please sign in to comment.