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]
This commit is contained in:
Sajina PK
2025-07-07 14:14:02 -04:00
کامیت شده توسط GitHub
والد 0497b7934f
کامیت 329183b112
3فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
@@ -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()
{