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

Tools: Omit include path parents when they're scan rules #7623

Merged
merged 1 commit into from Aug 1, 2018

Conversation

Projects
None yet
6 participants
@theotherjimmy
Contributor

theotherjimmy commented Jul 27, 2018

Description

Realistically, people don't do the following:

#include "TARGET_Freescale/mbed_rtx.h"

instead, they do this:

#include "mbed_rtx.h"

Knowing this, I remove collecting of include paths "through label
directories". Label directories are the things we scan for when building.
They start with TARGET_, TOOLCHAIN_ and FEATURE_. This PR collects
include path parents up to the first label dir.
I think an example is in order. Here is the Mbed OS targets directory:

targets
├── TARGET_ARM_FM
├── TARGET_ARM_SSG
├── TARGET_Analog_Devices
├── TARGET_Atmel
├── TARGET_Freescale
│  ├── TARGET_K20XX
│  ├── TARGET_KLXX
│  ├── TARGET_MCUXpresso_MCUS
│  └── mbed_rtx.h
├── TARGET_Maxim
├── TARGET_NORDIC
├── TARGET_NUVOTON
├── TARGET_NXP
├── TARGET_ONSEMI
├── TARGET_RENESAS
├── TARGET_Realtek
├── TARGET_STM
├── TARGET_Silicon_Labs
├── TARGET_TOSHIBA
├── TARGET_WICED
├── TARGET_WIZNET
├── TARGET_ublox
└── targets.json

Notice how there is no header file in the targets directory. When we
add include paths for the K64F, we would all parents of
targets/TARGET_Freescale/mbed_rtx.h. Which would be:

targets/TARGET_Freescale
targets

That's overkill. Instead this PR reduces this example to the following
include paths:

targets/TARGET_Freescale

While this may seem great, you would be hard pressed to measure this
improvement. It reduce the include paths by an entire 0.5% on MCC by
my measurements (20346, with this change; 20439 without).

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change
Reduce include paths further
by 0.45% for Mbed Cloud Client

@theotherjimmy theotherjimmy changed the title from Tools: Omit include path parents when they're scan rules ### Description to Tools: Omit include path parents when they're scan rules Jul 27, 2018

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 27, 2018

@deepikabhavnani @cmonr This is not as good as I hoped. All well.

@cmonr cmonr added the needs: review label Jul 27, 2018

@cmonr cmonr requested review from cmonr and deepikabhavnani Jul 27, 2018

@cmonr

cmonr approved these changes Jul 31, 2018

Interesting.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jul 31, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jul 31, 2018

Build : SUCCESS

Build number : 2711
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7623/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Aug 1, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 1, 2018

@studavekar @ARMmbed/mbed-os-test Are y'all able to confirm that the SPIF lib is being setup correctly? Unsure if this is a PR, examples.py, or CI config issue.

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Aug 1, 2018

@studavekar @ARMmbed/mbed-os-test Are y'all able to confirm that the SPIF lib is being setup correctly? Unsure if this is a PR, examples.py, or CI config issue.

Looks like it was a GitHub issue https://mbed-os.mbedcloudtesting.com/job/build_wrapper/5352/console

00:05:07.027 ssh: Could not resolve hostname github.com: Temporary failure in name resolution
00:05:07.028 fatal: Could not read from remote repository.
00:05:07.028 
00:05:07.028 Please make sure you have the correct access rights
00:05:07.028 and the repository exists.
00:05:07.637 abort: HTTP Error 406: Not Acceptable

image

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 1, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit 4cab24f into ARMmbed:master Aug 1, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 793 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9566 cycles (-104 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the needs: work label Aug 1, 2018

@adbridge

This comment has been minimized.

Contributor

adbridge commented Aug 10, 2018

Relies on #7183 which is scheduled for 5.10

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7623 from theotherjimmy/reduce-includes
Tools: Omit include path parents when they're scan rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment