Dependence Tracing Algorithm

-- TongxinBai - 21 Jan 2008

The profiling tool is built upon a compile-time instrumentation framework and a separate tool file that contains the realizations of the instrumented functions.


Each function is instrumented in one of the two modes: DETAIL and SKETCH. A text file named which is expected to be put in the source directory indicates which functions are to be instrumented in DETAIL mode.
  • In SKETCH mode each memory reference is instrumented.
  • In DETAIL mode, besides memory reference, function entry and exits will be instrumented too.
For each memory reference four items of data are passed as parameters to the instrumentation call.
  • run-time address of the memory access
  • source file name
  • line number in source code
For each function entry or exit the function name should be provided.


The main instrumentation interfaces are:
  • _bop_prof_rec_write,
  • _bop_prof_rec_read,
  • bop_instm_func_entry, and
  • and bop_instm_func_exit

recording write

void _bop_prof_rec_write (unsigned long addr, int sketch_p, char *file_name, int line) {
   update_pseudo_time ();
   if (!sketch_p) update_fronzen_time ();
   update_write (addr, file_name, line);
recording read
void _bop_prof_rec_read (unsigned long addr, int sketch_p, char *file_name, int line) {
   update_pseudo_time ();
   if (!sketch_p) update_fronzen_time ();
   w = lookup_write (addr);
   if (!w) return;
   /* not a function level dependence. ignore */
   if (w->frozen_time == current_frozen_time) return;

   output_dependence ();
recording function entry
void bop_instm_func_entry (char *file_name, char *func_name) {
   output_function_entering ();
recording function exit
void bop_instm_func_exit (char *func_name) {
   output_function_leaving ();

This topic: Main > TWikiGroups > CompilerGroup > CompilerRepository > GccVersion4_1_0 > DTTAlgorithm
Topic revision: r2 - 2008-01-22 - TongxinBai
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback