PAFLib is an IBM written library which exposes Power Architecture Facilities to userspace via an API
Shell Makefile C Assembly Roff M4 C++
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
common Refreshed configuration files Feb 4, 2016
dsc Fix error in libpaf-dsc and libpaf-ebb man pages example Apr 29, 2016
ebb Use stdu (doubleword) instead of stwu in ebb callback prolog on ppc64 Sep 14, 2017
m4 Refreshed configuration files Feb 4, 2016
ppr Refreshed configuration files Feb 4, 2016
tb Merge branch 'master' of git://github.com/RajalakshmiS/paflib into Ra… Feb 10, 2016
.gitignore Ignore more files in git Jul 16, 2015
CONTRIBUTING.md Added new maintainers and contribution guidelines. Feb 4, 2016
COPYING Changed license for PAFLib to: The MIT License (MIT). Sep 11, 2013
Makefile.am Add PPR support Jul 30, 2015
Makefile.in Refreshed configuration files Feb 4, 2016
README.md Enable EBB only if the compiler supports POWER8 Apr 27, 2015
aclocal.m4 Refreshed configuration files Feb 4, 2016
ar-lib Refreshed configuration files Feb 4, 2016
autogen.sh libpaf: Prevent autogen.sh to silently fail Nov 21, 2013
bootstrap Add bootstrap script Jul 8, 2015
compile Refreshed configuration files Feb 4, 2016
config.guess Refreshed configuration files Feb 4, 2016
config.h.in Refreshed configuration files Feb 4, 2016
config.sub Refreshed configuration files Feb 4, 2016
configure Release 0.3.0 Jul 29, 2016
configure.ac Release 0.3.0 Jul 29, 2016
depcomp Refreshed configuration files Feb 4, 2016
generate-changelog.sh Ignore wrongly formatted tags in the ChangeLog.md Jul 16, 2015
install-sh Refreshed configuration files Feb 4, 2016
ltmain.sh Refreshed configuration files Feb 4, 2016
make-release.sh Fix bugs in make-release.sh Jul 29, 2016
missing Refreshed configuration files Feb 4, 2016
test-driver Refreshed configuration files Feb 4, 2016

README.md

PAFLib

PAFLib is an IBM written library which exposes Power Architecture Facilities to userspace via an API. This includes the Data Stream Control Register Facility (DSCR) and the Event-Based Branching facility (EBB). Linux kernel 3.9 has exposed problem-state DSCR usage for ISA 2.06 (POWER7 – emulated) and ISA 2.07 (POWER8 – in hardware). Linux 3.10 has exposed the EBB facility.

Event Based Branching

To use the EBB library, just link to -lpaf-ebb. The system must be POWER ISA 2.07 compliant (POWER >= 8) to get EBB functionality.

The EBB library is automatically built when the compiler is able to generate instructions for POWER >= 8. In other words, when the compiler is using --with-cpu=power8. However, there are some cases in which the compiler doesn't generate POWER8 instructions by default, but the user wants to build the EBB library. In those cases, there are 2 options:

  • Configure paflib with '--enable-ebb', which will force the build of EBB library.
  • Configure paflib with CFLAGS='-mcpu=power8'.

It's important to notice that, in both cases the library won't execute on processors that don't implement the POWER ISA 2.07.

Data Stream Control Register

To use the DSCR library just link to -lpaf-dsc. The system must be POWER ISA 2.05 compliant (POWER6+) to get DSCR functionality and depending of the system supportted ISA the DSCR will operate in a different manner:

  • Power ISA 2.05 (POWER6): SSE (Store Stream Enable) and DPFD (Default Prefetch Depth);
  • Power ISA 2.06 (POWER7): SNSE (Stride-N Stream Enable);
  • Power ISA 2.06+ (POWER7+): LSD (Load Stream Disable)
  • Power ISA 2.07 (POWER8): URG (Depth Attainment Urgency), SWTE (Software Transient Enable), HWTE (Hardware Transient Enable), STE (Store Transient Enable), LTE (Load Transient Enable), SWUE (Software Unit Count Enable), HWUE (Hardware Unit Count Enable), and UNITCNT (Unit Count).

Also depending of the ISA the access to DSCR is privileged or not:

  • Power ISA 2.05/2.06/2.06+: Privileged
  • Power ISA 2.07: Problem-state (userland accessible).