Conditionally include backtraces in ROCPROFSYS_THROW based on verbosity (#272)

* Conditionally include backtraces in ROCPROFSYS_THROW based on verbosity

Modify ROCPROFSYS_THROW to only include backtraces when:
  debug mode is enabled, OR
  verbose level is >= 2, OR
  running in CI environment

* Fix formatting errors

[ROCm/rocprofiler-systems commit: b0ff07b4fe]
Цей коміт міститься в:
Sajina PK
2025-07-07 14:14:02 -04:00
зафіксовано GitHub
джерело 0497b7934f
коміт 329183b112
3 змінених файлів з 16 додано та 2 видалено
+6
Переглянути файл
@@ -73,6 +73,12 @@ exception<Tp>::exception(const char* _msg)
, m_what{ get_backtrace(_msg) }
{}
template <typename Tp>
exception<Tp>::exception(const std::string& _msg, bool with_backtrace)
: Tp{ _msg }
, m_what{ with_backtrace ? get_backtrace(_msg) : strdup(_msg.c_str()) }
{}
template <typename Tp>
exception<Tp>::~exception()
{