Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Redundancy in the make_extra.py script #6070

@grom72

Description

@grom72

ISSUE: Redundancy in the make_extra.py script

Please provide a reproduction of the bug:

It seems that cflow properly identifies inline functions but in some
situations it does not parse properly functions that are used inside inline
functions:

libpmem_init() <__attribute__ ((constructor)) void libpmem_init (void) at ./src/libpmem/libpmem.c:23>:
      common_init() <inline void common_init (const char *log_prefix, const char *log_level_var, const char *log_file_var, int major_version, int minor_version) at ./src/common/pmemcommon.h:19>:
              core_init() <inline void core_init (const char *log_prefix, const char *log_level_var, const char *log_file_var, int major_version, int minor_version) at ./src/core/pmemcore.h:24>:
                      util_init()
                      core_log_init()
                      out_init()
              util_mmap_init()

In the above example util_init(), core_log_init(), out_init() are not
parsed properly. This causes a "not called" error in make_call_stacks.py
script.
Acccording to a very brife analysis all calles listed on the right-hand side
shall be added to extra_entry_points.txt but they are not required in
extra_calls.json file.
It seems all callees of inline function (in the example above: util_init(),
core_log_init(), out_init()) are not further processed. This causes
the callees of these functions to be reported as not called (an error reported
by the make_call_stacks.py script).
Adding callees of inline functions as entry points allows forcing the cflow to
entry points.

cflow fails to continue:
function A -> inline function -> inline function's callee -> STOP

forced entry point:
inline function's callee -> ...

How often bug is revealed: (always, often, rare):

Actual behavior:

Expected behavior:

Details

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? (Yes, No)

Requested priority: (Showstopper, High, Medium, Low)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions