Wykres commitów

35 Commity

Autor SHA1 Wiadomość Data
Laurent Morichetti 6624fe4628 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 ../rocprofiler/src/util/hsa_rsrc_factory.h:29,
                 from ../rocprofiler/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 ../rocprofiler/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));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rocprofiler/src/util/hsa_rsrc_factory.cpp: In member function ‘const util::AgentInfo* util::HsaRsrcFactory::AddAgentInfo(hsa_agent_t)’:
../rocprofiler/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: I0c5cf7e0daf4cd6fcf7092efb1d9fd4c02a6c639


[ROCm/rocprofiler commit: 304d3366af]
2021-04-22 11:12:53 -07:00
Evgeny eddcdabf2a fixing gfx10 gfxip name
Change-Id: Ie58768d64117a616b1896489b505790cfa993054


[ROCm/rocprofiler commit: 64bdcaddc7]
2021-03-24 00:48:21 -05:00
Evgeny e06ff588ce porting of AQL packet submit to new atomic HSA queue API
Change-Id: I654448a7a8627978395d426118a5cb3ba2a92058


[ROCm/rocprofiler commit: 96ff7582ce]
2020-10-12 09:26:27 -05:00
Evgeny a331990ee4 optimization mechanism fix: correct tracker handler; kernel name query on completion;
Change-Id: I14da152b4ac3c7d8fd1af2f54e9d71f834071622


[ROCm/rocprofiler commit: 80747de208]
2020-08-03 23:34:49 -05:00
Evgeny 0bea31fe48 get_time API: make public; extende with more time id: coarse and raw; added time error return value;
Change-Id: I1641eb2c38915222204617e07fc0bfb388bb8346


[ROCm/rocprofiler commit: 3ce98d33d4]
2020-04-30 02:38:18 -05:00
Evgeny 31a7eac580 elliminaring the need of AMD_INTERNAL_BUILD macro defined
Change-Id: Ie97aef943793b1e4f40b7c7397af313520b35beb


[ROCm/rocprofiler commit: f819e1c463]
2020-04-09 23:41:51 -05:00
Evgeny d657afa812 adding AgentInfo::lds_block_size
Change-Id: I186893add96dc92570e710ae78b475897ebfe531


[ROCm/rocprofiler commit: 40730e34e4]
2020-02-18 14:00:19 -06:00
Evgeny ec6fd99b30 hsa_rsrc_factory sync
Change-Id: Idecbc0cdad6068eae5259cb043bdf5746b430aec


[ROCm/rocprofiler commit: 5615ade977]
2020-01-30 19:29:59 -06:00
Evgeny 6dd6ea0046 sgpr/vgpr reported sizes in terms of registers; lds size in bytes;
Change-Id: Id527687cc075a4e85ea4d0063ed8f336e34d2454


[ROCm/rocprofiler commit: c8eb0641bf]
2019-11-27 15:19:14 -06:00
Xianwei Zhang 3dce66bd80 build: slightly change files to pass compilation
Compiled using Clang and encountered errors on ambiguous pointer
type, implicit conversion NULL to bool, and unused function, etc.
As a fix, this patch slightly updates the related codes.

Change-Id: I4a73d66293313dda36749036f5c73aaf2a445231


[ROCm/rocprofiler commit: ee917344ff]
2019-08-22 23:29:16 -04:00
Evgeny 8b6c9cc839 creation fix
Change-Id: I717d96555677664ce0a926cf1c3c3c48f55287d9


[ROCm/rocprofiler commit: 1ed97815f1]
2019-03-13 15:17:56 -05:00
Evgeny da6e7f7da4 moving to non-deprecated get extension table HSA API
Change-Id: I356c6406eb5c2a1755202dc562298b30cb7acc06


[ROCm/rocprofiler commit: 01aa4c4ffb]
2018-09-26 13:20:36 -05:00
Evgeny 5af5a02478 licensing annotation
Change-Id: Icdd79e25e7ba30e777f1024697f87d583f380a62


[ROCm/rocprofiler commit: f6f857f6f4]
2018-08-19 04:18:55 -05:00
Evgeny b3e79bee45 cpu_pool/kern_arg_pool search fix for multi core host
Change-Id: Ia7e3a0dcbb8912e88edbf4ba2028818f09599374


[ROCm/rocprofiler commit: bd07ed73fd]
2018-08-17 16:34:30 -05:00
Evgeny d31b372430 build compatibility
Change-Id: Ifde4b2e4e7cb48d5c06ccce5eb76b7b943c4114a


[ROCm/rocprofiler commit: a8db3d930c]
2018-06-26 16:05:39 -05:00
Evgeny 368f9f2b5d license annotations
Change-Id: I96b8f625a03b707b45aee6b8e7dbfabe073294c6


[ROCm/rocprofiler commit: add56e26ae]
2018-06-25 19:52:28 -05:00
Evgeny 32b472e246 documentation and cleanup, public metrics only
Change-Id: I8213d193ce2ba632adf133e630fd91baf9e81ddd


[ROCm/rocprofiler commit: ca5c0e8928]
2018-06-22 10:16:13 -05:00
Evgeny 81356f3745 test: scenario with different counters sets per dispatch
Change-Id: Ia0866d485128e7295cbf98c3241a6113ce8d98b8


[ROCm/rocprofiler commit: 53211acd04]
2018-06-01 09:06:51 -05:00
Evgeny 425946e27a sync and clean up
Change-Id: Ia3b2d76f9016454b9e80ca0891ee02e0c2fd1a13


[ROCm/rocprofiler commit: 2d4d704f56]
2018-05-16 13:24:04 -05:00
Evgeny 7ae981cdd2 aqlprofile/rocprofiler util sync
Change-Id: If029a5aa4eff9ad3e01dc83b41426c079f7f03a7


[ROCm/rocprofiler commit: cca3ca68c1]
2018-05-16 13:04:07 -05:00
Evgeny 052cedda1a adding allocate cmd memory
Change-Id: I5fcc18673eba92e4ff84eb97ddfb16e6797eaf0d


[ROCm/rocprofiler commit: 8bed188f6a]
2018-05-03 18:50:29 -05:00
Evgeny 42458339af SQTT local allocation
Change-Id: Ie4a150ad0dc141226f6f1c571916c5a526dd723c


[ROCm/rocprofiler commit: 9dec361cd4]
2018-04-29 03:24:46 -05:00
Evgeny e761eda5fa memory allocation refactoring
Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6


[ROCm/rocprofiler commit: c9c0ecc976]
2018-04-27 20:00:20 -05:00
Evgeny 0a8e945d88 HSA memory alloc/copy/free refactoring
[ROCm/rocprofiler commit: d04f7095f4]
2018-04-20 11:15:26 -05:00
Evgeny 7b30d4bf87 loading of config rpl_rc.xml file; range format [N], [N:], [N:M]
[ROCm/rocprofiler commit: e4384c2c51]
2018-04-05 18:03:05 -05:00
Evgeny c1b3fa7d52 profiling controll options
[ROCm/rocprofiler commit: 1c8f767da4]
2018-02-27 13:32:11 -06:00
Evgeny 36434ee974 update
[ROCm/rocprofiler commit: 0b0ce2d931]
2018-02-19 18:18:51 -06:00
Evgeny 4b7e5f51da read API
[ROCm/rocprofiler commit: ff1e5b67a7]
2018-02-02 15:38:28 -06:00
Evgeny 9ed6c7daeb minor changes
[ROCm/rocprofiler commit: ac1dfb13cc]
2018-02-02 14:29:58 -06:00
Evgeny 80d462a8c2 resources releasing; metrics
[ROCm/rocprofiler commit: 79510b8c6c]
2018-02-01 14:52:21 -06:00
Evgeny f92f655139 fixing resources releasing
[ROCm/rocprofiler commit: 9a9418ad16]
2018-01-22 17:02:46 -06:00
Evgeny 4fb86567a1 minor changes
[ROCm/rocprofiler commit: c00a0feb36]
2018-01-04 20:11:30 -06:00
Evgeny 24695e37be several fixes; adding direct loading of alprofile library
[ROCm/rocprofiler commit: 8270530fec]
2017-12-19 15:32:34 -06:00
Evgeny 8b5a6b7fed coding style formatting
[ROCm/rocprofiler commit: cb3a591826]
2017-11-29 13:53:12 -06:00
Evgeny 5fea997bc9 ROC profiler prototype sources importing
[ROCm/rocprofiler commit: 85278f08a0]
2017-11-09 17:26:19 -06:00