c - Jump every X instructions -


i need keep track of quantity of work done programs, inside single thread. have minimum impact on (c) code. there way trigger piece of code every x instructions ?

i thinking adding check @ compile time, every x instructions. ok inside branch, (without in depth branch analysis) requires check @ every jump ... in programs many jumps costly.

is there tool/technique allows analyse branches of code (at compilation) checks placed @ places ?

i'd @ doing way, i.e. using profiler or cpu accounting.

if using linux, bizarrely enough, posix mandated standard times() doesn't (or @ least didn't) meant to, , in fact gives (or gave) per thread accounting data:

http://pubs.opengroup.org/onlinepubs/000095399/functions/times.html

essentially linux threads are processes under hood. might useful you.

(apologies isn't direct answer long comment)


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -