Граф коммитов

35 Коммитов

Автор SHA1 Сообщение Дата
Sean Keely abd712f33f Update copyright date.
Change-Id: If4bf4c20cf051878bfe759080bb7345d884dd53d


[ROCm/ROCR-Runtime commit: ce19721c88]
2020-06-19 22:34:01 -04:00
Konstantin Zhuravlyov b1f050524b Add support for code object URI to ROCr
Adds the following:
	- New factory method to create a code object reader from
          file with offset and size.
	- A pair of queries on a loaded code object to get the URI name/length.
	- A bump to the AMD vendor loader extension API and its associated table.

Change-Id: I17c83e9c2447d29a43c438459395365f786a3611


[ROCm/ROCR-Runtime commit: 9eb735ec24]
2020-06-01 11:07:50 -04:00
Laurent Morichetti 3ead90a027 Add debugger support for wave halted at launch
New trap handler ABI: Record in ttmp11[8:7] the event that caused the
trap handler to be entered. We currently record 2 events, trap_raised
if an s_trap instruction was executed, or excp_raised if an exception
(MEM_VIOL or ILLEGAL_INST) was raised.

Change-Id: Ie278c8277437b3b67c2737dcd1a12fe6511df428


[ROCm/ROCR-Runtime commit: 00da82f951]
2020-04-29 19:29:56 -04:00
Laurent Morichetti 124a7e0e0c Return a file URI for elf images in shared objects
Iterate the loaded shared objects to see if the given elf image binary
is part of a loaded segment.

Change-Id: I074cacd99eb5b59f883f4ce2bd901e0e35a660b8


[ROCm/ROCR-Runtime commit: 5f783494f1]
2020-04-14 15:22:43 -04:00
Ramesh Errabolu 38747b8fec Update how code references publicly available ROCr headers
Change-Id: I357c51eb713a23704d4fee71081be46a73a71806


[ROCm/ROCR-Runtime commit: 627991b1c1]
2020-02-21 20:01:11 -05:00
Saleel Kudchadker 7c5a08073f Reset link_map map in the constructor
Change-Id: I8a6ad3bc0fca790dec2992cacf9288068b3bcaa3


[ROCm/ROCR-Runtime commit: c57f3da1dc]
2020-02-19 15:29:35 -08:00
Sean Keely d7d1f6e2e3 Support stripped binaries and remove unneeded attributes.
Attribute optimize(0) doesn't appear to be helpful helpful.  This
prevents optimization in the function but not at call sites to the
function.  The function may still be inlined since it has no side
effect (in some cases that we currently don't support).

Having a side effect prevents a call site optimization that allows
removal of a noinline function call with no side effect.  Call site
optimization should only happen (in GCC at least) when using whole
program optimization so this may be stronger than we strictly need.

Also added _amdgpu_r_debug to the exported symbol list (global) and
switched to the standard macro for an exported symbol (HSA_API).
Without being in the global list the debugger will not find this
symbol if the binary has been stripped.

Change-Id: Ieb00175ccc55fda4491deee44711cd55b3f24aeb


[ROCm/ROCR-Runtime commit: 3e9aca0f34]
2020-01-21 20:08:02 -05:00
Laurent Morichetti 74cd6e1197 Fix a build error when compiling with clang
Check __clang__ before __GNUC__ as clang defines both.

Change-Id: I9963f8e0665efb4cb08bd3886fb38fee42dd9861


[ROCm/ROCR-Runtime commit: 19e1fb3a4e]
2020-01-15 18:52:53 -08:00
Qingchuan Shi a9208ef64f fix optimize(0) for clang.
Change-Id: I83bc57d42815f37445ae97bf6950147e3358ac45


[ROCm/ROCR-Runtime commit: d63886190f]
2020-01-13 20:53:40 -05:00
Qingchuan Shi 2ab9ce6d5c Adding code object list in loader.
Change-Id: Iab3541287bd56276fd32615ee59fcd590de84ca0


[ROCm/ROCR-Runtime commit: 16a20cfb8c]
2019-10-30 20:31:51 -04:00
Konstantin Zhuravlyov 2b9e13a56c Loader: add basic logging abilities
- Enabled with env var LOADER_ENABLE_LOGGING=1

Change-Id: Ibdbb1b55ffddb7dc9c63e52fc9db3013409376a4


[ROCm/ROCR-Runtime commit: 2275c74695]
2019-08-21 13:29:15 -04:00
Sean Keely 49e70a3ef5 PR from github user DiamondLovesYou.
Allow user specified profiles if the HSAIL note is not found.

Konstantin reviewed and approved.  HSAIL note is not generated by LLVM.

Change-Id: I40fbfbaedd6787b6a716507918f698d02007afe1


[ROCm/ROCR-Runtime commit: 465a8eb40b]
2019-07-16 13:55:38 -05:00
Konstantin Zhuravlyov dde11e307d Process symbols with 0 address
Change-Id: I9ed943a8ccd3b103edd6aba8264c009d8cda29fa


[ROCm/ROCR-Runtime commit: 7001134757]
2019-03-30 02:14:43 -04:00
Konstantin Zhuravlyov a506e18fd2 Loader: update symbol processing for v2+
- Skip symbols that are STB_LOCAL and not STT_AMDGPU_HSA_KERNEL

Change-Id: I68567f58de9bf3f07dbd8020ef63f47667c86367


[ROCm/ROCR-Runtime commit: 8bee6e4976]
2019-01-18 15:42:28 -05:00
Konstantin Zhuravlyov 564ac4b348 Loader updates for code object v3
- Fix loading in some cases
  - Fix symbol kind

Change-Id: I721b4a35972b6d2a6d0ac733ab770b096cc74e17


[ROCm/ROCR-Runtime commit: c1ad82a6b7]
2019-01-18 15:41:01 -05:00
Konstantin Zhuravlyov fde14b8588 Fix dynamic relocations:
- Process dynamic relocation even if there is
    no symbol associated to it.

Change-Id: Iaefee682ee52f5acda8280e5764e6d5fd992774a


[ROCm/ROCR-Runtime commit: a447d79430]
2018-11-14 15:25:41 -05:00
Konstantin Zhuravlyov dd2ab28ddb Loader: Add support for v3 object code.
Change-Id: I7215bd0c1277c2036bf0fadf5b23cb57fdf7f665


[ROCm/ROCR-Runtime commit: 386874da55]
2018-10-06 14:01:59 -04:00
Scott Linder 42d4d4ebcf Apply dynamic relocations for STT_FUNC symbols
Required to support function calls through GOT table.

Change-Id: I174a0269fdd67369d38fe41855b7bd01f350b839


[ROCm/ROCR-Runtime commit: 47f0e6f7d3]
2018-09-23 21:42:32 -04:00
Konstantin Zhuravlyov 683c95a3b7 Bring naming on par with the spec (hsa-runtime)
Change-Id: Ie1903c90a195cf95b186eb5552131a20af408adf


[ROCm/ROCR-Runtime commit: 7ef70f7eaa]
2018-04-10 09:15:02 -04:00
Wilkin c7af4e8857 ROCm Runtime Support for respecting target xnack setting
This includes the changes provided by Konstantin, "Add xnack from elf header" (Change 136389).

Change-Id: I95e51141caa0d7c21903b09212c02e4906ec54a3


[ROCm/ROCR-Runtime commit: 8e3d26c617]
2018-03-20 16:57:15 -04:00
Tony Tye ab3c53761b Add support for R_AMDGPU_RELATIVE64
- Add support for R_AMDGPU_RELATIVE64 relocation record.
- Return status error if any unsupported relocation record encountered.

Change-Id: Icbb5dcb81109a70c1f2195412a0df58a11be9da1


[ROCm/ROCR-Runtime commit: d472b24d05]
2018-01-30 18:20:26 -05:00
Qingchuan Shi 3e9a0561c0 Add APIs to support debugging vm fault
1. Add hsa ext api hsa_amd_register_vmfault_handler for debugger to register callback in case of VM fault.
2. Extend hsa_ven_amd_loader API to:
   (1) iterate loaded code objects in executable:
       hsa_ven_amd_loader_executable_iterate_loaded_code_objects
   (2) get loaded code object info:
       hsa_ven_amd_loader_loaded_code_object_get_info
3. Make the id of hsa_queue the same as the one used in communication with thunk (for amd_aql_queue)

Change-Id: I68910809e59e24297350d262606f00e96c14bcbd


[ROCm/ROCR-Runtime commit: ce6aee01ed]
2017-10-28 21:48:26 -04:00
Konstantin Zhuravlyov 2a071e1456 Bring loader in sync with stg/sc
Change-Id: Iccce07b8fa03d37c4267a2a9bd343e6614dc43e7


[ROCm/ROCR-Runtime commit: 9887c26113]
2017-02-10 11:21:15 -05:00
Konstantin Zhuravlyov 578c17681b Revert "Bring loader in sync with stg/sc"
This reverts commit cdcc5ec921.

Change-Id: If99e8cc9e2afb525f690e49eb6538d8e950a5615


[ROCm/ROCR-Runtime commit: 08aded148a]
2016-12-14 15:14:36 -05:00
Konstantin Zhuravlyov cdcc5ec921 Bring loader in sync with stg/sc
Change-Id: I684522c442de0872007a7e4da8919067fc7b42b3


[ROCm/ROCR-Runtime commit: c798c60343]
2016-12-13 16:30:25 -05:00
Ramesh Errabolu e3d8eac639 Initial set of changes for ThreadTrace
Change-Id: I07ce31f9b4f508cef0fc9ca6dadcf26b6c90361e


[ROCm/ROCR-Runtime commit: eb2efb83d1]
2016-11-21 23:40:56 -06:00
Konstantin Zhuravlyov 05a7b5a9e4 Remove load_legacy parameter + change prefix for some loaded code object queries back to AMD
Change-Id: I74e905abd77dab3a7a00b5ced94cd9b5130365c5


[ROCm/ROCR-Runtime commit: 4b86843409]
2016-11-20 13:46:17 -05:00
Konstantin Zhuravlyov ee3b926381 Allocate only one segment for code object v2+
Change-Id: I7cd03b5c205d3ea5735f8f29820867ca90ac081b


[ROCm/ROCR-Runtime commit: 54245e064c]
2016-11-03 09:51:11 -04:00
Konstantin Zhuravlyov 65e3c8c179 Initialize symbol's agent member for agent allocation symbols
Change-Id: I0ee0e07e4132ca13b3ecf7469c59ca327ff3c76d


[ROCm/ROCR-Runtime commit: 6f216f30c2]
2016-10-13 12:43:19 -04:00
Konstantin Zhuravlyov e10cd184ef Update code object/isa/loader to hsa v1.1
- Includes Sean's latest changes
- Cleanups/improvements
- Fixes for few bugs that crept over from previous releases

Change-Id: I839dc4895bf13ebd0afc8843424387a9fef667b0


[ROCm/ROCR-Runtime commit: c2c993e0d8]
2016-08-22 15:03:23 -04:00
Konstantin Zhuravlyov b43cdae36b Implement new load map API.
Change-Id: I5f148fe66f899b2fa6a2e75430afa988f38db58d

[ROCm/ROCR-Runtime commit: 0e4cab3001]
2016-06-28 11:32:19 -04:00
Konstantin Zhuravlyov bf46c9e840 Add support for dynamic relocations (code object v2.1)
Change-Id: Ic19be97d3ea78b53f5aa814787515b587d0be21b


[ROCm/ROCR-Runtime commit: 5a14d496ab]
2016-05-26 14:09:07 -04:00
Nikolay Haustov [TEXT] 6b9e626507 Cherry-pick CL 1250286 from SC stg.
HSA Finalizer: Add dumping of code object, ISA and executable to loader.

This is controlled by loader options -dump-all, -dump-isa, -dump-code, -dump-exec

The options can now also be set with env variable LOADER_OPTIONS_APPEND.

Added tests to finalizer_offline

Testing: smoke, dumping on hardware

Reviewed by: Konstantin Zhuravlyov

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1255351]


[ROCm/ROCR-Runtime commit: a795909bca]
2016-04-07 06:01:20 -05:00
Nikolay Haustov [TEXT] b69a730231 HSA Finalizer: Merge changes in libamdhsacode and loader from sc_prm into hsa/compiler/finalizer and hsa/runtime.
Testing: pre-checkin

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1251389]


[ROCm/ROCR-Runtime commit: 46842a57e5]
2016-03-25 08:36:20 -05:00
James Edwards (xN/A) TX 67e6064a6a Check open source core runtime code into perforce. This includes license and README files.
[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1249136]


[ROCm/ROCR-Runtime commit: c9ffe0004e]
2016-03-20 15:39:40 -05:00