Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#26 Annotate indirect function calls


Apparently the indirect function calls are not annotated in the
profile model. Thus, they can lead to incorrect cross-reference
with the source file and, possibly, skew profile results.

See the indirect call to read_one_macroblock_i_slice_cavlc()
the attached h264 decoder for a test case.

1 Attachments


  • This info could narrow a possible search for function pointers declared in H.264 decoder:

    • Most of indirect function calls whose nodes appear in the trace dependency view (and consequently provide a wrong cross reference) correspond to functions declared in global.h.

    • In global.h, it is interesting to pay attention to Macroblock and Slice structure definitions which contain function pointers as elements. The wrong cross references start appearing when unfolding macroblock-/slice-level function nodes.

    • This bug propagates to nodes in levels below read_one_macroblock_i_slice_cavlc() and read_one_macroblock_p_slice_cavlc() that contain indirect calls.

    • Other similar functions are declared in: cabac.h, erc_api.h, mbuffer.h, config_common.h, mbuffer_common.h, memalloc.h.

    • The rest of header files, apparently don't contain any declaration of indirect functions.
  • Thanks!!

  • Moreover, doing xref of indirect called functions from data dependency views, provides the correct reference to the function implementation source code.

    It seems the xref problem resides only when referencing from trace views.

  • The body of functions should be xref-ed correctly, regardless
    of how they are called.

    Only the folds of the indirect calls need to be fixed.

    Last edit: Mihai T. Lazarescu 2013-08-29
  • Ok. The following might be a consequence of the missing annotations of indirect function calls.

    • Pressing "c" over the read_one_macroblock_i_slice_cavlc() node doesn't pop up any window with the corresponding source code.
    • Unfolding that node, shows other indirectly-called functions on which the "c" shortcut works (giving wrong xref). E.g: readSyntaxElement_UVLC(),