Gráfico de commits

35 Commits

Autor SHA1 Mensaje Fecha
Laurent Morichetti bb98bc7d85 Clean up logger.h
Change-Id: Ibcb58d2236b012d00c3fc421a425c03093de5d50
2022-09-16 09:55:09 -07:00
Laurent Morichetti db69cc1c9f Fix the Loader
Instead of dlopen'ing RTLD_NOLOAD a library (for example libamdhip64.so)
and rely on the dynamic linker search path, search through the already
loaded shared objects for a library with a matching name.

Change-Id: I3e74d432bd7ca68df8927ca435b290e86aaaf9e9
2022-09-08 20:58:07 -07:00
Laurent Morichetti 2673bf5e2c SWDEV-351980 - Consolidate registration tables in the roctracer
Change-Id: I44cd1cc81cf6a529aed89ee8db1377c0aa67f0dc
2022-09-08 20:58:05 -07:00
Laurent Morichetti 57867e4803 Use fatal() and warning() for logging errors
Change-Id: I4d525ed2a7dba72beff6fbe43383015e55465fcd
2022-09-06 19:38:16 -07:00
Laurent Morichetti 80d363a4bc New util library
- Add string_printf/string_vprintf.
- Add warning and error with backtrace support.

Change-Id: I3dd73b4caed0d767bd9e39ffef15ff8484d0b0bf
2022-08-17 21:44:58 -07:00
Laurent Morichetti 1e8e53da1d Move exception.h to the roctracer
Only the roctracer API is using exceptions to return error codes to the
client application.

Change-Id: I92e5bd1a044dbde0c80dd9ef87e606550c3ff790
2022-05-24 23:52:07 -04:00
Laurent Morichetti c0cbcdff1d Move callback_table.h to the util directory
The CallbackTable utility is shared by multiple APIs, so move it out
of the roctracer directory.

Change-Id: Ie2378dca8a4f90bd334dbe2d39ced37c9e790ed0
2022-05-24 15:52:31 -07:00
Tony Tye a4db4084db Improve error reporting and error codes
Make error codes more informative and have negative values. This is an
ABI break but it does not appear known tools are relying on the exact
error codes.

Use logging for all errors so that roctracer_error_string will be able
to return last error message.

Make internal errors fatal and abort.

Do not use the tracer API exceptions in the tracer tool.

Change-Id: Ie8ed3d50e5ad26625ac9d1263f7e048edb5584c0
2022-05-24 15:32:56 -04:00
Laurent Morichetti b34e9c2ee4 File reorganization
Move the tracer_tool from the 'test' directory to the 'src' directory.

Change-Id: I13768b9610cd359f78a66147f0255ab1e4c657e9
2022-05-20 10:36:38 -07:00
Laurent Morichetti 4ced94b9a2 Remove now unused hsa_rsrc_factory
Change-Id: I66175eb9fae2e7e61400af77a0c89be9c39e770e
2022-05-10 08:13:18 -07:00
Laurent Morichetti 5963363484 Fix assertions
Replace EXC_ABORT() checks with assertions.

Rewrite the exception class to use std::runtime_error (as it
already handles the std::string/char* message argument).

Change-Id: I48e31924f3aea1328e6562ab6bb06ec373fd5d5e
2022-04-27 11:24:26 -07:00
Ammar ELWazir e4569c41fe SWDEV-295522: Fixing Performance Issue
Removing DEBUG_TRACES and the unnecessary use of roctracer_op_string, made the MS app reporting 78 to 81 stable samples per second, depending on the type of the trace, while the main app without rocprof reports 100 to 106. More detailed numbers will be posted in the ticket.

Change-Id: Ifbc529278cea54dd23e6086aa9b9ea2df952d5dd
2022-04-22 18:51:49 -04:00
Laurent Morichetti 121a84b449 Remove HCC_EXC_RAISING and HIP_EXC_RAISING
HCC_EXC_RAISING and HIP_EXC_RAISING don't add much value, so to
simplify, only keep EXC_RAISING and EXC_ABORT.

Change-Id: Ifdc54981bb682fe68b418cdc95ecebe668e3dcf6
2022-04-22 11:22:23 -07:00
Laurent Morichetti dc22139977 Address review comments from previous commit
Change-Id: I6629dd911de0d7fd08d7a863c172ec73f35fa3d1
2022-04-20 22:46:15 -04:00
Laurent Morichetti 15ab5d9cda Run clang-format on all source files
Change-Id: Ifb52ca306286b6b2d473821bed9db28e9f616d50
2022-04-20 22:45:54 -04:00
Laurent Morichetti 06a3da7c63 Fix copyright headers
Change-Id: I380d867fa5fb04e68b5b332e9abf33fbeb1e9418
2022-04-19 09:30:45 -07:00
Rachida Kebichi e5dd1e9b85 SWDEV-284863 Fixed several issues preventing memcpy info dump in csv
Change-Id: I4c6323311ce8314296e81a9b9b5d8adb485e0aa8
2021-05-25 11:10:52 -04:00
Laurent Morichetti 297b613604 Fix random bugs discovered while reading the code
In HsaTimer::correlated_pair_ns, the time ID should be used to
select the clock ID passed to clock_gettime.

In MemoryPool::allocator_default, pass the correct value to realloc.

Change-Id: I5d10c0994c07fdeadd99c81deba4e71a4f579523
2021-05-20 21:22:16 -04:00
Laurent Morichetti 38009bfba4 Fix a compilation error with gcc-9.3.0
On Ubuntu 20.04, in Release mode, gcc fails with this error:

In file included from /usr/include/string.h:495,
                 from /opt/rocm/include/hsa/hsa_api_trace.h:57,
                 from ../roctracer/src/util/hsa_rsrc_factory.h:29,
                 from ../roctracer/src/util/hsa_rsrc_factory.cpp:25:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘const util::AgentInfo* util::HsaRsrcFactory::AddAgentInfo(hsa_agent_t)’ at ../roctracer/src/util/hsa_rsrc_factory.cpp:323:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../roctracer/src/util/hsa_rsrc_factory.cpp: In member function ‘const util::AgentInfo* util::HsaRsrcFactory::AddAgentInfo(hsa_agent_t)’:
../roctracer/src/util/hsa_rsrc_factory.cpp:322:39: note: length computed here
  322 |     const int gfxip_label_len = strlen(agent_info->name) - 2;
      |                                 ~~~~~~^~~~~~~~~~~~~~~~~~

The error is caused by the following 2 lines:

    const int gfxip_label_len = strlen(agent_info->name) - 2;
    strncpy(agent_info->gfxip, agent_info->name, gfxip_label_len);

The size argument to strncpy should not depend on the input string.

Since the terminating character is not considered (the copy is at
most len - 2 bytes), using memcpy is preferable. Also, make sure
the destination does not overflow by clamping the size.

Change-Id: I37c5c45418e7c31a017581b6c16e5d47cd61aec5
2021-04-19 22:57:51 -07:00
Evgeny 2287da5e28 fxing gfxip label
Change-Id: Ic22d828b38da8afc5a232c2f2eb5de5410844b70
2021-03-28 08:11:58 +00:00
Evgeny 1c77416a6c SWDEV-267198 : adding gpu index to hsa_handles file
Change-Id: I6ddba45ab31fff97a1f85f889c56693accf8f5bc
2021-03-09 15:37:44 -06:00
Evgeny 7d8fd0606d Adding dumping of HSA handles
Change-Id: I18e2cfdf2574110bffa09d30c7ac1d3941252939
2020-12-01 16:45:33 -05:00
Evgeny ef61a39603 SWDEV-249924 : hip correlation id explicite propogation; tracer debug instrumentation;
Change-Id: Ibbc411541f5610ce739f3fc1efa1ab7f605220f5

initial commmit

Change-Id: I34b360be62c2083819dc5c3acc8268bd69f2f58a
2020-10-06 13:25:51 -04:00
Evgeny e9087dcd86 saving time for roctx records 2020-01-29 23:39:08 -06:00
Evgeny 05315465cf hsa_rsrc_factory sync 2020-01-29 22:39:22 -06:00
Evgeny a8c5e2edce fixing clang error 2019-10-02 15:29:09 -05:00
Evgeny 231e25747f roctx marka implementation 2019-08-30 08:53:34 -05:00
Evgeny c1cca98a71 multiple changes update 2019-06-28 12:47:06 -05:00
Evgeny 429a660dce explicitely resolving the types scope 2019-04-26 11:50:34 -05:00
Evgeny 69a480a971 instance creation fix 2019-03-13 15:54:47 -05:00
Evgeny a996505c2e async copy activity handling 2019-01-22 03:55:03 -06:00
Evgeny a27f63b110 licensing annotation 2018-08-08 15:47:30 -05:00
Evgeny c7f4758675 adding prof-protocol layer 2018-08-07 03:25:55 -05:00
Evgeny 5151f6ce04 betta version 2018-05-25 01:56:25 -05:00
Evgeny 0a934cff68 Initial commit 2018-05-10 13:19:10 -05:00