From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/roctracer/, dev-util/roctracer/files/
Date: Sun, 24 Jan 2021 07:43:38 +0000 (UTC) [thread overview]
Message-ID: <1611474183.d1e25273456a9f38b842f65e9c5bc1ac63c5c13d.heroxbd@gentoo> (raw)
commit: d1e25273456a9f38b842f65e9c5bc1ac63c5c13d
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 14:37:07 2021 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Jan 24 07:43:03 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1e25273
dev-util/roctracer: performance tracing for AMD GPUs.
Closes: https://github.com/gentoo/gentoo/pull/19148
Suggested-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Suggested-by: Wilfried Holzke <gentoo <AT> holzke.net>
Bug: https://bugs.gentoo.org/650804
Bug: https://github.com/gentoo/gentoo/pull/10724
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
dev-util/roctracer/Manifest | 1 +
...roctracer-3.8.0-gen_ostream_ops-toPython3.patch | 28 +++++++++++
dev-util/roctracer/metadata.xml | 19 +++++++
dev-util/roctracer/roctracer-4.0.0-r1.ebuild | 58 ++++++++++++++++++++++
4 files changed, 106 insertions(+)
diff --git a/dev-util/roctracer/Manifest b/dev-util/roctracer/Manifest
new file mode 100644
index 00000000000..d6046052c24
--- /dev/null
+++ b/dev-util/roctracer/Manifest
@@ -0,0 +1 @@
+DIST rocm-tracer-4.0.0.tar.gz 462166 BLAKE2B 1294b5639a743a9d32737c72dc0f082b5a33ee1b3365f48221ad6392cdde7637926c42ea344fa96e9fc8410ea04e9ce3f535e188a25130f4be764c4d4a59b69c SHA512 312cd6c4c98a83e28a9f8b9e6123862af2e80a0d0852acff11be65d198f277c6ea194e72f6dbaccab1dd5d4af318bef28ca546e49440f22d024a546a4e5e9e15
diff --git a/dev-util/roctracer/files/roctracer-3.8.0-gen_ostream_ops-toPython3.patch b/dev-util/roctracer/files/roctracer-3.8.0-gen_ostream_ops-toPython3.patch
new file mode 100644
index 00000000000..b73949b9233
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-3.8.0-gen_ostream_ops-toPython3.patch
@@ -0,0 +1,28 @@
+--- a/script/gen_ostream_ops.py 2020-09-27 11:23:37.833756185 +0200
++++ b/script/gen_ostream_ops.py 2020-09-27 11:21:25.763756688 +0200
+@@ -176,9 +176,9 @@
+ process_struct(f, c, cppHeader, "", apiname)
+ global_str = "\n".join(global_str.split("\n")[0:-2])
+ if structs_depth != -1: #reindent
+- global_str = string.split(global_str, '\n')
+- global_str = [' ' + string.lstrip(line) for line in global_str]
+- global_str = string.join(global_str, '\n')
++ global_str = global_str.split('\n')
++ global_str = [' ' + line.lstrip() for line in global_str]
++ global_str = str.join('\n', global_str)
+ f.write(global_str+"\n")
+ if structs_depth != -1:
+ f.write(" };\n")
+@@ -199,9 +199,9 @@
+ process_struct(f, c, cppHeader, "", apiname)
+ global_str = "\n".join(global_str.split("\n")[0:-2])
+ if structs_depth != -1: #reindent
+- global_str = string.split(global_str, '\n')
+- global_str = [' ' + string.lstrip(line) for line in global_str]
+- global_str = string.join(global_str, '\n')
++ global_str = global_str.split('\n')
++ global_str = [' ' + line.lstrip() for line in global_str]
++ global_str = str.join('\n', global_str)
+ f.write(global_str+"\n")
+ if structs_depth != -1:
+ f.write(" };\n")
diff --git a/dev-util/roctracer/metadata.xml b/dev-util/roctracer/metadata.xml
new file mode 100644
index 00000000000..eec4ce34fdd
--- /dev/null
+++ b/dev-util/roctracer/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>gentoo@holzke.net</email>
+ <name>Wilfried Holzke</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ROCm-Developer-Tools/roctracer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/roctracer/roctracer-4.0.0-r1.ebuild b/dev-util/roctracer/roctracer-4.0.0-r1.ebuild
new file mode 100644
index 00000000000..04c9a3080f2
--- /dev/null
+++ b/dev-util/roctracer/roctracer-4.0.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake prefix
+
+DESCRIPTION="Callback/Activity Library for Performance tracing AMD GPU's"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/roctracer.git"
+SRC_URI="https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-${PV}.tar.gz -> rocm-tracer-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/rocr-runtime
+ sys-devel/llvm-roc
+ dev-util/hip"
+DEPEND="dev-python/CppHeaderParser
+ dev-python/ply
+ ${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/roctracer-3.8.0-gen_ostream_ops-toPython3.patch"
+)
+
+S="${WORKDIR}/roctracer-rocm-${PV}"
+
+src_prepare() {
+ # do not build the tool and it´s library;
+ # change destination for headers to include/roctracer;
+ # do not install a second set of header files;
+ sed -e "/LIBRARY DESTINATION/s,lib,$(get_libdir)," \
+ -e "/add_subdirectory ( \${TEST_DIR} \${PROJECT_BINARY_DIR}/d" \
+ -e "/DESTINATION/s,\${DEST_NAME}/include,include/roctracer," \
+ -e "/install ( FILES \${CMAKE_CURRENT_SOURCE_DIR}/d" \
+ -e "/install ( FILES \${PROJECT_BINARY_DIR}/d" \
+ -i CMakeLists.txt || die
+
+ # do not download additional sources via git
+ sed -e "/execute_process ( COMMAND sh -xc \"if/d" \
+ -e "/add_subdirectory ( \${TEST_DIR} \${PROJECT_BINARY_DIR}/d" \
+ -i test/CMakeLists.txt || die
+
+ hprefixify script/*.py
+
+ eapply_user
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DHIP_VDI=1
+ -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/include/hsa:${EPREFIX}/usr/lib"
+ )
+
+ cmake_src_configure
+}
next reply other threads:[~2021-01-24 7:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-24 7:43 Benda XU [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-10-30 16:47 [gentoo-commits] repo/gentoo:master commit in: dev-util/roctracer/, dev-util/roctracer/files/ David Seifert
2022-05-01 14:43 Benda XU
2022-08-08 1:38 Benda XU
2023-01-31 14:18 Benda XU
2023-02-01 9:53 Andreas Sturmlechner
2025-01-05 21:49 Sam James
2025-02-13 8:38 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1611474183.d1e25273456a9f38b842f65e9c5bc1ac63c5c13d.heroxbd@gentoo \
--to=heroxbd@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox