mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 11:04:10 -04:00
sys-apps/intel-cmt-cat: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
1
sys-apps/intel-cmt-cat/Manifest
Normal file
1
sys-apps/intel-cmt-cat/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST intel-cmt-cat-4.2.0.tar.gz 470596 BLAKE2B 781e69a7019a27e87b6b6c8d2c914305a837d019cadf8d1b6221942c631e0e46531a292379d7979ae88e7a590b155bc4e5a62777bdd9ebfb2881471ef64bfa32 SHA512 ccfae2e3fa5bb8b7dfe5ed39ab20a8526eb759378aeb14fb7ed79f4f94820cd69e497c9e7d411f1d9ec40c07ca4c7c4f2db6ff1e034a8517c01c06bd8a70d4b6
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/lib/perl/Makefile.PL
|
||||
+++ b/lib/perl/Makefile.PL
|
||||
@@ -42,8 +42,8 @@
|
||||
WriteMakefile(
|
||||
'NAME' => 'pqos',
|
||||
'VERSION' => "0.1",
|
||||
- 'CCFLAGS' => "$Config{ccflags} -Wno-unused-variable -Wno-unused-value",
|
||||
- 'LIBS' => ['-lpqos', '-L/usr/local/lib -lpqos'],
|
||||
+ 'CCFLAGS' => "$Config{ccflags} -Wno-unused-variable -Wno-unused-value -I..",
|
||||
+ 'LIBS' => ['-lpqos', '-L.. -lpqos'],
|
||||
'OBJECT' => 'pqos_wrap.o',
|
||||
'clean' => {FILES => "pqos_wrap.c"},
|
||||
);
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
my $swig_target = <<"SWIG_MAKEFILE";
|
||||
pqos_wrap.c:
|
||||
- $swig -perl -outdir \$(INST_LIB) -I/usr/local/include \$(EXTRA_SWIGFLAGS) pqos.i
|
||||
+ $swig -perl -outdir \$(INST_LIB) -I.. \$(EXTRA_SWIGFLAGS) pqos.i
|
||||
SWIG_MAKEFILE
|
||||
|
||||
my $perltidy_targets = <<'PERLTIDY_MAKEFILE';
|
||||
108
sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0.ebuild
Normal file
108
sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0.ebuild
Normal file
@@ -0,0 +1,108 @@
|
||||
# Copyright 2020-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} pypy3 )
|
||||
|
||||
inherit distutils-r1 perl-module
|
||||
|
||||
DESCRIPTION="User space software for Intel(R) Resource Director Technology"
|
||||
HOMEPAGE="
|
||||
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
|
||||
https://github.com/intel/intel-cmt-cat
|
||||
"
|
||||
SRC_URI="https://github.com/intel/intel-cmt-cat/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="perl"
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
perl? ( dev-lang/perl:= )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
PATCHES=( "${FILESDIR}/${PN}-perl-makefile.patch" )
|
||||
|
||||
distutils_enable_tests unittest
|
||||
|
||||
src_prepare() {
|
||||
mkdir -p "${T}/prefix" || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake all PREFIX="${T}/prefix"
|
||||
|
||||
if use perl; then
|
||||
pushd "lib/perl" || die
|
||||
perl-module_src_configure
|
||||
perl-module_src_compile
|
||||
popd || die
|
||||
fi
|
||||
pushd "lib/python" || die
|
||||
python_foreach_impl distutils-r1_python_compile
|
||||
popd || die
|
||||
# pushd "appqos" || die
|
||||
# python_foreach_impl distutils-r1_python_compile
|
||||
# popd || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install PREFIX="${T}/prefix"
|
||||
|
||||
dobin "${T}"/prefix/bin/*
|
||||
doheader "${T}"/prefix/include/*
|
||||
doman "${T}"/prefix/man/man*/*
|
||||
dolib.so "${T}"/prefix/lib/*
|
||||
|
||||
dobin tools/membw/membw
|
||||
dobin snmp/rdt-agentx.pl
|
||||
|
||||
dodoc ChangeLog README
|
||||
docinto membw
|
||||
dodoc tools/membw/README
|
||||
docinto pqos
|
||||
dodoc -r pqos/README pqos/configs
|
||||
docinto lib
|
||||
dodoc lib/README
|
||||
docinto lib/python
|
||||
dodoc lib/python/README.txt
|
||||
docinto snmp
|
||||
dodoc snmp/README
|
||||
docinto rdtset
|
||||
dodoc rdtset/README
|
||||
docinto appqos
|
||||
dodoc appqos/README.md
|
||||
|
||||
if use perl ; then
|
||||
pushd "lib/perl" || die
|
||||
unset DOCS
|
||||
myinst=( DESTDIR="${D}" )
|
||||
perl-module_src_install
|
||||
popd || die
|
||||
docinto lib/perl
|
||||
dodoc lib/perl/README
|
||||
fi
|
||||
unset DOCS
|
||||
pushd "lib/python" || die
|
||||
python_foreach_impl distutils-r1_python_install
|
||||
popd || die
|
||||
# pushd "appqos" || die
|
||||
# python_foreach_impl distutils-r1_python_install
|
||||
# popd || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
pushd "lib/python" || die
|
||||
python_foreach_impl python_test
|
||||
popd || die
|
||||
# pushd "appqos" || die
|
||||
# python_foreach_impl python_test
|
||||
# popd || die
|
||||
}
|
||||
51
sys-apps/intel-cmt-cat/metadata.xml
Normal file
51
sys-apps/intel-cmt-cat/metadata.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/intel/intel-cmt-cat/issues</bugs-to>
|
||||
<remote-id type="github">intel/intel-cmt-cat</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="person">
|
||||
<email>lssndrbarbieri@gmail.com</email>
|
||||
<name>Alessandro Barbieri</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
Overview
|
||||
========
|
||||
|
||||
This software package provides basic support for
|
||||
Intel(R) Resource Director Technology (Intel(R) RDT) including:
|
||||
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
|
||||
Cache Allocation Technology (CAT), Code and Data Prioritization (CDP)
|
||||
and Memory Bandwidth Allocation (MBA).
|
||||
|
||||
In principle, the software programs the technologies via
|
||||
Model Specific Registers (MSR) on a hardware thread basis.
|
||||
MSR access is arranged via a standard operating system driver:
|
||||
msr on Linux and cpuctl on FreeBSD. In the most common architectural
|
||||
implementations, presence of the technologies is detected via the
|
||||
CPUID instruction.
|
||||
|
||||
In a limited number of special cases where CAT is not architecturally
|
||||
supported on a particular SKU (but instead a non-architectural
|
||||
(model-specific) implementation exists) it can be detected via brand
|
||||
string. This brand string is read from CPUID and compared to a table
|
||||
of known-supported SKUs. If needed, a final check is to probe the
|
||||
specific MSR’s to discover hardware capabilities, however it is
|
||||
recommended that CPUID enumeration should be used wherever possible.
|
||||
|
||||
From software version v1.0.0 the library adds option to use Intel(R) RDT via
|
||||
available OS interfaces (perf and resctrl on Linux). The library detects
|
||||
presence of these interfaces and allows to select the preferred one through
|
||||
a configuration option.
|
||||
As the result, existing tools like 'pqos' or 'rdtset' can also be used
|
||||
to manage Intel(R) RDT in an OS compatible way. MSR interface remains
|
||||
the default option for now. 'pqos' tool wrappers have been added to help with
|
||||
the interface selection. 'pqos-os' and 'pqos-msr' for OS and MSR interface
|
||||
operations respectively.
|
||||
|
||||
PID API compile time option has been removed and the APIs are always available.
|
||||
Note that proper operation of these APIs depends on availability and
|
||||
selection of OS interface.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user