Skip to content
Scott Pakin edited this page Feb 9, 2019 · 42 revisions

Byfl documentation

Introductory material

Usage examples

Compiler wrapper scripts

These all contain pretty much the same information. Take your pick.

In addition to the above, Byfl also provides more manual control of instrumentation via the following script:

  • bf-inst instruments LLVM bitcode produced by any compiler.

The idea is that you generate LLVM bitcode (e.g., the -emit-llvm option in Clang), pass it to bf-inst, and bf-inst instruments the code using Byfl, and writes a new LLVM bitcode file.

Output postprocessors

Byfl programs generate a binary .byfl file as output. The following programs convert .byfl files to various other formats:

  • bfbin2xmlss converts a .byfl file to a formatted XML Spreadsheet spreadsheet that can be imported into LibreOffice Calc, Microsoft Excel 2003+, and Numbers for Mac.
  • bfbin2csv outputs a .byfl file in comma-separated value format for ease of parsing
  • bfbin2sqlite3 converts a .byfl file to a SQLite 3 database. SQLite 3 databases are standalone files that can be used as is or imported into a heavyweight database management system.
  • bfbin2hdf5 recodes a .byfl file in HDF5 format, a format often used for scientific data.
  • bfbin2hpctk generates an HPCToolkit database from a .byfl file's Functions table. These databases can be loaded into the hpcviewer GUI and compared side-by-side with non-Byfl-produced HPCToolkit databases. Screenshot
  • bfbin2cgrind generates a Callgrind file from a .byfl file's Functions table. Callgrind files can be loaded into the KCachegrind GUI for visualization and analysis. Screenshot

All of the above are implemented using a callback-based API that Byfl provides. The API includes a single C function that parses a .byfl file and calls user-defined functions for each table, column header, and data value it encounters. You can use the API to write your own .byfl output postprocessors:

SWIG wrappers are installed if SWIG is available. These let you write .byfl postprocessors in a variety of scripting languages. The SWIG version of the Byfl API is not based on callbacks because SWIG doesn't currently support callback functions. The following example shows how to process a .byfl file from Python:

Publications

For now, this is the best paper to cite in research publications that refer to Byfl:

  • Scott Pakin and Patrick McCormick, "Hardware-independent application characterization". 2013 IEEE International Symposium on Workload Characterization (IISWC), Portland, Oregon, USA, 22-24 Sept. 2013, pp. 111–112. ISBN: 978-1-4799-0553-9, DOI: 10.1109/IISWC.2013.6704676.

More Byfl-related publications can be found on the Byfl publications page.

Current build status

Byfl uses Travis CI for a third-party check that the code builds cleanly. The following is Byfl's current build status:

Byfl branch Build status
master Build status for Byfl master
Clone this wiki locally