Wykres commitów

169 Commity

Autor SHA1 Wiadomość Data
Laurent Morichetti 15ab5d9cda Run clang-format on all source files
Change-Id: Ifb52ca306286b6b2d473821bed9db28e9f616d50
2022-04-20 22:45:54 -04:00
Laurent Morichetti 89f6880371 Simplify journal.h
Simplify implementation of journal.h.

Change-Id: I9e2e93fd3cd3391fdf182249f5c4c5ef3debae03
2022-04-20 19:43:16 -07:00
Laurent Morichetti 06a3da7c63 Fix copyright headers
Change-Id: I380d867fa5fb04e68b5b332e9abf33fbeb1e9418
2022-04-19 09:30:45 -07:00
Ammar Elwazir 57add1a6fa Revert "SWDEV-295522: Fixing Performance Issue"
This reverts commit e7327aaac7.

Reason for revert: Merged by mistake

Change-Id: I8c39c823d92cc20a238ca6120dde4b2fa9121e85
2022-04-07 06:55:34 -04:00
Ammar ELWazir e7327aaac7 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: Ida25d3bfc72047afaa27326d697be76d97564334
2022-04-07 00:07:24 +00:00
Ammar ELWazir 43a36f8dd5 SWDEV-328300: supporting centos-9 for roctracer
Changing pthread_yield() to sched_yield() as pthread_yield() is deprecated in CentOS 9

Change-Id: I2961b61374e36995d0835f0e65b26c35f5eb8715
2022-03-18 01:26:39 +00:00
Ranjith Ramakrishnan ebda880c4a SWDEV-291455: Prefer rocm include path to hip include path
Change-Id: I1fa96e72169fac689a3a2ed38e988d7f5d18bf04
2022-02-14 14:21:32 -08:00
Saurabh Verma a7cd80b716 SWDEV-295878 Fix for seg fault when using --trace-start off
Change-Id: Ic76d814b3591f72db18319d78f34596dae1ddfee
2021-08-31 16:46:59 -05:00
Ammar ELWazir 513460bd41 SWDEV-294248 (Fixing Race Conditions):
Fixing race conditions that happened when enabling trace-period feature on the following code:
#include <hip/hip_runtime.h>
__global__ void
kernel ()
{
}
int
main (int argc, char **argv)
{
  for (size_t i = 0; i < 10000; ++i) {
    hipLaunchKernelGGL (kernel, 1, 1, 0, 0);
    hipDeviceSynchronize ();
  }
  return 0;
}

Change-Id: I4eb88a4a71efbad0f6483e7fb6e8e0c6a662860b
2021-08-11 22:48:55 -04:00
Ammar Elwazir 53fa06ad66 Merge "Fixing correlation_id_map" into amd-staging 2021-08-11 21:44:59 -04:00
Ammar Elwazir 682ebba1c2 Merge "Cosmetic change" into amd-staging 2021-08-11 20:47:53 -04:00
Ammar ELWazir b02586c587 Cosmetic change
Fixing variable names and removing un-needed references

Change-Id: I3ed2cee89e7dc599caf1726fe1eab1a913e5a93d
2021-08-09 14:13:57 -04:00
Ammar ELWazir 1e3ed06a9a Fixing correlation_id_map
Changing correlation_id_map to static instance instead of being a pointer and fixing the corresponding references

Change-Id: Id8a481a90b46831f91985a7e0523fd2869991aeb
2021-08-09 14:05:52 -04:00
Christophe Paquot e5e1258ef8 SWDEV-295205 - Remove KFD domain from roctracer
Change-Id: I2771cf43aa115bb466531bf887f7cc75e187f2ef
2021-07-22 10:12:45 -07:00
Christophe Paquot b04dfd5fdf SWDEV-281658 - Preserve the callback IDs enum ordering
Use HIP_API_ID_NONE to detect unsupported API instead of
HIP_API_ID_NUMBER which can grow with a new version of the API.
This HIP_API_ID_NONE enum has a fixed value of 0 so the
HIP_API_IDs really start at FIRST.

Change-Id: I760aa50ddf6fa6d46bf20555ad7d429335a53f97
2021-06-30 09:52:20 -04: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 8fb3cdb30b Make HIP_VDI the default
As this snippet shows, HCC is no longer supported by roctracer:

#if HIP_VDI
...
#else
#error HCC support dropped
#endif

Removed HIP_VDI from the CMakeLists.txt, and the source code.

Change-Id: Ib273da2a5af6d67fa1b021a7eca3ff785c8b9c73
2021-05-20 21:20:27 -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 912cfd4cf8 SWDEV-251491 : fixing tracing on exit
Change-Id: I1bf2a6093331e7a08179b9f64394c5c49206ef0e
2020-12-25 01:49:44 -05:00
Rachida Kebichi 2d31848c44 SWDEV-259683 HIP API records filtering
Change-Id: I43ca5e022d2c055b6a9bc2c09b4276b490a4b986
2020-12-16 16:29:36 -05:00
Evgeny bb5f2231a1 calling python3 explictely
Change-Id: I3dda55865bafa41cc6670e414b213f13a2a2a7ac
2020-12-16 14:29:12 -05:00
Evgeny b83ffeeab8 SWDEV-258731 : cleanup
Change-Id: Iabcc81576eb8b6c0484eae820c3e25a896da6c5b
2020-12-02 13:52:57 -06:00
Evgeny Shcherbakov 6a59675f01 Merge "Adding dumping of HSA handles" into amd-staging 2020-12-02 06:35:04 -05:00
Evgeny 7d8fd0606d Adding dumping of HSA handles
Change-Id: I18e2cfdf2574110bffa09d30c7ac1d3941252939
2020-12-01 16:45:33 -05:00
Rachida Kebichi ef36218286 SWDEV-255938 NEW - added regex and depth support to ostream ops
Change-Id: I292255adab3a70fa00a1dd5685b788521687f35b
2020-11-18 16:48:50 -05:00
Evgeny cb3643da05 SWDEV-254329 : extending debug trace with timestamps, cmake option '-DCMAKE_DEBUG_TRACE=1'
Change-Id: Id16c01a6c00f6384c37fa9b5a9709a5e98e1fb57
2020-10-14 00:07:12 -04:00
Evgeny 29c63c5281 SWDEV-213367 : codeobj event implementation
Change-Id: Ibcaca6869ce96d8802c5fa8ba241f43834d6f2a7

update - codeobj event implementation

Change-Id: I4c12f26a19f2b31d9ac2211c3426a0e587a332b3

update2 - codeobj event implementation

Change-Id: Ic877549a83542ae00352503471d881e847ebac9c

test - codeobj event implementation

Change-Id: I0618d3a93de94c3d7467372ba4a3d4ea5520bfc7

URI reference test - codeobj event implementation

Change-Id: I6cf7e8a648cf012cb0708058b118a75e58f992b9

adding test/app - codeobj event implementation

Change-Id: Idf4c197c7b9116ccde5ec50ff47a26a858bfab32

uri test fix - codeobj event implementation

Change-Id: I7c385f82f516d9d8f2cd726366f00be3664006e3

uri test cleanup - codeobj event implementation

Change-Id: I542d5baf88c048c8b4717af843b803cd93e8f3bc

URI buffer fix - codeobj event implementation

Change-Id: Iac65e04c03a0939935c10f53c6b580a2e33878f5

HSA events tests trace-check disabled

Change-Id: I0f4d13aeeceb1d1a6e2191673eacbf9c7ae2ae52
2020-10-09 08:36:12 -04:00
Evgeny Shcherbakov 02fcb90a4b Merge "hip library loader check" into amd-staging 2020-10-07 19:01:55 -04:00
Evgeny 9061c4ea41 hip library loader check
Change-Id: I34957db88932e1ed725a0a0d8ca9a66fecc92e38
2020-10-07 17:53:51 -04: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 ed1f1b66ac build normalizing - generating under build directory
Change-Id: Id9203aec7800024bd749059a415fb29b8051005a
2020-09-07 15:24:58 -05:00
Evgeny 156d9327cc flush-rate option fixed
Change-Id: I74ff83ebf2a0a4ba414d30b7cb193522f44660ce
2020-08-20 15:11:38 -05:00
Evgeny ddcb68d0a8 optimized tool stats
Change-Id: Ia9c06879f6e2e195e589c53299c2cafe96a4bfe5
2020-08-20 15:11:21 -05:00
Rachida Kebichi d3406bdb7b Merge "Added roctxRangeStart and roctxRangeEnd" into amd-master 2020-08-12 10:32:29 -04:00
Rachida Kebichi da17a158f8 Added roctxRangeStart and roctxRangeEnd
Change-Id: Id7f81c5a7d7f231c8f0e2323d31c37c827687189

Added roctxRangeStart and roctxRangeEnd

Change-Id: Id7f81c5a7d7f231c8f0e2323d31c37c827687189
2020-08-11 17:28:03 -04:00
Evgeny f027cf1e22 trace buffer initializatino fix
Change-Id: Ibb4b3e939d74b776dbdd7ae0c2af02535974abd8
2020-08-06 03:08:33 -05:00
Evgeny a9048f33a8 roctracer static linking
Change-Id: I4df98c6d9991a3a58e2f646fc0c8fe8f104a105d
2020-08-05 02:26:40 -05:00
Evgeny Shcherbakov de338b02e6 Merge "Added hsa ostream ops generation" into amd-master 2020-07-30 11:24:32 -04:00
Rachida Kebichi bac4bae41c Added hsa ostream ops generation
Change-Id: Icc68e136d22b05b35d6adaff56e090272633d760
2020-07-29 10:41:32 -04:00
Evgeny 9bb4b0d311 fixed recursive mutex
Change-Id: Id63d022b8fd9e900f40b1f991ecb413419d527ad
2020-07-16 05:53:20 -05:00
Rachida Kebichi 64ee8f29ef support for hip multi kernels
Change-Id: Idc8945f924ceb35081e153921181b96ee5f653b6
2020-06-11 15:13:33 -04:00
Evgeny 07479cf881 adding tracer flush/unload stage unloading
Change-Id: Id84774b2ce20b261a9a84d2ad802b76093a748d4
2020-06-02 05:10:02 -05:00
Evgeny 511f659a8e hipLaunchKernel kernel name fix
Change-Id: I59c63ec34f77fe39ed1edc8b6395db3871004e40
2020-05-29 13:16:14 -04:00
Evgeny 173c83c6d4 fixing rocm root
Change-Id: I79ff754775565d4500254e4566b8c994c237ba34
2020-05-18 22:35:30 -05:00
Evgeny 98dbca9058 hip apr stream porting to hip vdi; hip_api_string off by default
Change-Id: I2a9b55b8bdc372743b175797c0d4827fe8931033
2020-05-13 06:06:17 -05:00
Evgeny 807bd250f6 using env variables to set compilers
Change-Id: I9af812c4528d0f14c4318436c74a0c63e25d0527
2020-05-08 05:01:19 -04:00
Evgeny 3d4f6b3002 buffer wrap-thread startup fix
Change-Id: I857cff63d28dcc068eddbd3ae2bc0193c428ec41
2020-05-07 06:45:29 -05:00