Commit Graph

63 Commits

Author SHA1 Message Date
Ammar ELWazir 00ecca25c7 Fixing Multiple Profiler Issues:
1- Fixing Output Buffer Issues
2- Metrics Instances created for all GPUs in Init
3- Multi CPU/GPU/KernArg Pools are initialized for every Agent in Init
4- Lowering OverHead in the Packet WriteInterceptor in the ProxyQueue for both Profile Counting & ATT

Change-Id: Ic3d78156af8405bb134d01584574c339237d265f
2023-05-30 21:41:54 -05:00
Ammar ELWazir 720f2fd9df Fixing Rebase Issues
Change-Id: I69d6c9fd8f8a05951b543f30195de87dc993e5b7
2023-04-11 03:56:46 +00:00
Ammar ELWazir a5e1069920 Fixing rocprofilerv2 naming and CMake issues
Change-Id: Ib6d336349a056731e5c0f35151296d6fea671360
2023-03-29 15:55:05 +00:00
Ammar ELWazir 80676bb478 SWDEV-379553: Fix for counters
Change-Id: I65b9bf61c6fc288f95461981979699ccccc4820f
2023-03-09 13:21:09 +00:00
Ammar ELWazir dc69331379 Fixing rocprofilerv2 naming and CMake issues
Change-Id: Ib6d336349a056731e5c0f35151296d6fea671360
2023-03-09 13:21:01 +00:00
Ammar ELWazir 6dda141e4b GPU ID issue
Before, the GPU IDs were counted starting from zero, now CPU IDs are counted from zero and then GPU IDs from the last CPU_ID+1

Change-Id: I3f815195ad97933e02f249841e53b64b674370d9
2023-03-09 13:20:35 +00:00
Ammar ELWazir 8032adb64f Adding rocprofilerv2
Change-Id: Ic0cc280ba207d2b8f6ccae1cd4ac3184152fc1ad
2023-03-09 13:20:33 +00:00
Ammar ELWazir 553a4c7ee7 GPU Index to use HSA AMD Agent Driver Node ID
Change-Id: Ia814f64419615f1d77fc09fc88f11bbaf75afd45
2022-11-21 14:05:33 -05:00
Ranjith Ramakrishnan e7eb195924 SWDEV-345870 - Correct include paths for new directory layout
Use hsa header files from /opt/rocm-ver/include rather than using wrapper files from /opt/rocm-ver/hsa/include/hsa

Change-Id: Id7a9bde19447cd2a0fd6e03b11c08471f09c2a46
2022-07-14 16:08:41 -07:00
Laurent Morichetti 304d3366af 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
2021-04-22 11:12:53 -07:00
Evgeny 64bdcaddc7 fixing gfx10 gfxip name
Change-Id: Ie58768d64117a616b1896489b505790cfa993054
2021-03-24 00:48:21 -05:00
Evgeny 96ff7582ce porting of AQL packet submit to new atomic HSA queue API
Change-Id: I654448a7a8627978395d426118a5cb3ba2a92058
2020-10-12 09:26:27 -05:00
Evgeny 858e0b0f8a HSA trace kernel name demangling
Change-Id: I6d8b674137405a93939c38d7e615af5a114f04ca
2020-08-28 05:40:17 -05:00
Evgeny 80747de208 optimization mechanism fix: correct tracker handler; kernel name query on completion;
Change-Id: I14da152b4ac3c7d8fd1af2f54e9d71f834071622
2020-08-03 23:34:49 -05:00
Evgeny 30db99e758 setting code-obj tracking by default
Change-Id: Id6a97a7dc77faa3b7eb0e2b81b75c13ca7fc5818
2020-05-28 03:43:12 -05:00
Evgeny 3ce98d33d4 get_time API: make public; extende with more time id: coarse and raw; added time error return value;
Change-Id: I1641eb2c38915222204617e07fc0bfb388bb8346
2020-04-30 02:38:18 -05:00
Evgeny f819e1c463 elliminaring the need of AMD_INTERNAL_BUILD macro defined
Change-Id: Ie97aef943793b1e4f40b7c7397af313520b35beb
2020-04-09 23:41:51 -05:00
Evgeny a5f52b40f5 JSON kernel name propogation and stats
Change-Id: I60cf4c7608272941e2499bd251850416ac254f32
2020-02-26 19:45:49 -06:00
Evgeny 40730e34e4 adding AgentInfo::lds_block_size
Change-Id: I186893add96dc92570e710ae78b475897ebfe531
2020-02-18 14:00:19 -06:00
Evgeny 5615ade977 hsa_rsrc_factory sync
Change-Id: Idecbc0cdad6068eae5259cb043bdf5746b430aec
2020-01-30 19:29:59 -06:00
Evgeny 9bdd497a51 minor changes;
Change-Id: I4266d6af1adef66637b3c971fa21c800240a79ef
2020-01-14 10:25:13 -06:00
Evgeny 4d5a11fbbf adding rocprofiler_get_time API
Change-Id: I9202b3e97f8f9ca7485f87ea22746a9c4d8091c3
2019-12-30 13:55:04 -06:00
Evgeny c8eb0641bf sgpr/vgpr reported sizes in terms of registers; lds size in bytes;
Change-Id: Id527687cc075a4e85ea4d0063ed8f336e34d2454
2019-11-27 15:19:14 -06:00
Evgeny 60043d198b code object tracking and v3 code object support
Change-Id: I081ada13f6364ea4401a97a485dedfa9bf8a45fe
2019-11-19 20:18:09 -06:00
Xianwei Zhang ee917344ff 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
2019-08-22 23:29:16 -04:00
Evgeny a91d1e039a adding hsa_system_get_info, hsa_amd_profiling_set_profiler_enabled to shadow hsa api table
Change-Id: I18859caa45c268f573210aad0b5d8bcc745d3e2e
2019-04-02 12:22:34 -05:00
Evgeny 1ed97815f1 creation fix
Change-Id: I717d96555677664ce0a926cf1c3c3c48f55287d9
2019-03-13 15:17:56 -05:00
Evgeny df860838a2 supporting original hsa api table
Change-Id: Ia98554c137a3ec6433d8234ba17ca4dc2f2be940
2019-03-06 13:41:54 -06:00
Evgeny 89ff4ace93 introducing hsa api duplicating table
Change-Id: I4bbf933def018ad7b282fa08e587c53f5a44b336
2019-03-05 19:42:26 -06:00
Evgeny ea0a1110dc minor changes
Change-Id: I16444de8c5d83a9f33392ac870d2fc188978ab54
2018-12-18 09:51:47 -06:00
Evgeny 01aa4c4ffb moving to non-deprecated get extension table HSA API
Change-Id: I356c6406eb5c2a1755202dc562298b30cb7acc06
2018-09-26 13:20:36 -05:00
Evgeny b481bfe5de standalone/sampling mode
Change-Id: I24c358bfebacb5678fb3d31f2f94ae867a1c9ac9
2018-09-18 20:33:41 -05:00
Evgeny f6f857f6f4 licensing annotation
Change-Id: Icdd79e25e7ba30e777f1024697f87d583f380a62
2018-08-19 04:18:55 -05:00
Evgeny bd07ed73fd cpu_pool/kern_arg_pool search fix for multi core host
Change-Id: Ia7e3a0dcbb8912e88edbf4ba2028818f09599374
2018-08-17 16:34:30 -05:00
Evgeny 2cccdb566e compiling for CentOS support
Change-Id: I0c01b4f34ac3701b5cea324e2e2a34835163aee0
2018-07-27 15:06:26 -05:00
Evgeny 4d790c8eee adding tracker handler
Change-Id: Iea47c25b3c9b6e1eadf097c34323727181975cca
2018-07-25 14:55:21 -05:00
Evgeny 2f83829f4f adding -Werror=unused-result compilation flag
Change-Id: I2869d0a150918ad56cefed07d278cbcc6ef5a4b4
2018-07-13 16:15:48 -05:00
James Edwards 98bae77eea Fix build break for logger.h.
Change-Id: I4b783a1ca668e1c2b2712c31ed4904258b1e3af7
2018-07-13 15:34:25 -05:00
Evgeny 013721eb62 adding session log
Change-Id: I3e1568f711ca1e863f8d912ba4598ac3ede5a46f
2018-07-11 11:39:15 -05:00
Evgeny bc7a052294 adding counters instancing info
Change-Id: Idccc776ed91cafe9662b84bfad4149dde0c82caf
2018-07-09 13:48:57 -05:00
Evgeny a8db3d930c build compatibility
Change-Id: Ifde4b2e4e7cb48d5c06ccce5eb76b7b943c4114a
2018-06-26 16:05:39 -05:00
Evgeny add56e26ae license annotations
Change-Id: I96b8f625a03b707b45aee6b8e7dbfabe073294c6
2018-06-25 19:52:28 -05:00
Evgeny ca5c0e8928 documentation and cleanup, public metrics only
Change-Id: I8213d193ce2ba632adf133e630fd91baf9e81ddd
2018-06-22 10:16:13 -05:00
Evgeny 53211acd04 test: scenario with different counters sets per dispatch
Change-Id: Ia0866d485128e7295cbf98c3241a6113ce8d98b8
2018-06-01 09:06:51 -05:00
Evgeny cca3ca68c1 aqlprofile/rocprofiler util sync
Change-Id: If029a5aa4eff9ad3e01dc83b41426c079f7f03a7
2018-05-16 13:04:07 -05:00
Evgeny 9dec361cd4 SQTT local allocation
Change-Id: Ie4a150ad0dc141226f6f1c571916c5a526dd723c
2018-04-29 03:24:46 -05:00
Evgeny c9c0ecc976 memory allocation refactoring
Change-Id: Ic63b4f5ea44f2dc5e009e3e58652a661e957b7d6
2018-04-27 20:00:20 -05:00
Evgeny d04f7095f4 HSA memory alloc/copy/free refactoring 2018-04-20 11:15:26 -05:00
Evgeny aea5d8e0d9 context array valid bit reverted
Change-Id: Ibbbf19ffd2e66750d7296d2b45850c21bb86445a
2018-03-21 21:11:42 -05:00
Evgeny 363700581a adding timestamps dispatch/begin/end/complete
Change-Id: I8c23e5f7ff75174243224ff008ba266553ee30c8
2018-03-05 20:59:01 -06:00