Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace runtime strip_path function with compiler intrinsic equivalents #6377

Merged
merged 5 commits into from Mar 23, 2018
Merged

Replace runtime strip_path function with compiler intrinsic equivalents #6377

merged 5 commits into from Mar 23, 2018

Commits on Mar 15, 2018

  1. Replace runtime strip_path function with compiler intrinsic equivalents

    Sleep manager tracing strips the path from filenames and uses the result as an
    identifier to track drivers that unlock/lock sleep tracing. Replace the function
    that strips the path from the string, replace this function with a new macro,
    __FILENAME__ which performs the same action in a compiler specific manner.
    
    - GCC_ARM, use __builtin_strrchr which is optimized out at compile time.
    - ARM, use __MODULE__ which returns the filename without path.
    - IAR, specifiy the --no_path_in_file_macros compiler flag.
    Steven Cartmell committed Mar 15, 2018
    Copy the full SHA
    bd63f93 View commit details
    Browse the repository at this point in the history
  2. Refactor sleep tracing driver identifier to be pointer to the driver …

    …filepath.
    
    The use of __FILE__ macro to get a usable identifier from the driver path
    causes the path of the file to be stored in the .text region of the binary.
    Given that this remains for the entire duration of the program, storing a
    pointer to this string as an identifier is more efficient than copying the
    contents of the string during lookup/insertion.
    Steven Cartmell committed Mar 15, 2018
    Copy the full SHA
    9a0e879 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2018

  1. Remove superfluous compiler check in macro

    Steven Cartmell committed Mar 16, 2018
    Copy the full SHA
    1e3050a View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2018

  1. Remove IAR compiler flag change from PR

    Steven Cartmell committed Mar 19, 2018
    Copy the full SHA
    6d7576a View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2018

  1. Fix issues with __FILENAME__ macro

    - Move macro definition to mbed_toolchain.h
    - Remove double underscores from macro which are reserved.
    - Fix macro for IAR until compiler flags to disable path are added again.
    Steven Cartmell committed Mar 20, 2018
    Copy the full SHA
    ab2abcb View commit details
    Browse the repository at this point in the history