Skip to content

aspear/CIFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copyright (c) 2011 Aaron Spear [email protected]

CIFT is an MIT licensed low footprint static library that can be linked with any application built with GCC. The library takes advantage of the GCC feature that allows instrumentation of function entry and exits to enable minimally intrusive collection of this data for analysis. When rebuilding and then running any application linked against this library, you are able to trace flow control through functions for all threads with cycle accurate timestamps.

The inspiration for the library is to show how a legacy tracer can be migrated to generate the new "Common Trace Format (CTF)" data. The goal is to have an example flow that is similar to what any RTOS or trace probe vendor might have:

    * generate trace data in memory in legacy system
    * dump that trace data as is to a binary file
    * convert that binary file to a CTF standard trace using BabelTrace
    * import into standard trace analyzer

Implementation details

The library creates a buffer in memory in which it circularly enters fixed size function enter/function exit events. it uses a simple lock-less mechanism to put events in the buffer. There is a good bit of configurability in the library at build time, see cift.h for the options. You can control the size of the buffer, control the nature of the buffering (circular - overwriting the oldest, or 'fill and stop'), and then there are optional API functions that dump the data as text or as raw binary.

more to come! 
Aaron Spear

About

Compiler Instrumentation Function Tracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published