Commit-Graf

19 Incheckningar

Upphovsman SHA1 Meddelande Datum
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