Skip to content

Replace mbed_mem_tracing_enabled macro with config option #7402

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

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

kegilbert
Copy link
Contributor

@kegilbert kegilbert commented Jul 2, 2018

Description

Move the memory tracing enabled macro to a config option - #5225

There are a few macros that'd benefit from this (heap/stack/etc reporting for one). This does however break existing mbed_app.json files that relied on just defining the macro (you should get compile time warnings about redefinitions if you are defining the macro separately):

[Warning] mbed_config.h@147,0: "MBED_MEM_TRACING_ENABLED" redefined  

Is this a reasonable path forward? How should we handle transitioning to the config option definition rather than if the macro exists style?

NOTE Need to update the docs to match this as well. See - ARMmbed/mbed-os-5-docs#275

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[X] Breaking change

@kegilbert kegilbert requested a review from SenRamakri July 2, 2018 18:48
Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

Is this a reasonable path forward? How should we handle transitioning to the config option definition rather than if the macro exists style?

@ARMmbed/mbed-os-tools Can tools handle this - make changes like this non-breaking?

@kegilbert The breaking change is that it would produce warnings and a user should remove the macro, and use a config? Or is there anything else to be done?

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Jul 9, 2018

@0xc0170 There is no current method for deprecating config parameters macros and replacing them with config params.

@kegilbert Please avoid using internal links.

@kegilbert
Copy link
Contributor Author

@0xc0170 Correct, you should get some build warnings about the macro being redefined. The macro definition should be removed and replaced by the equivalent config option.

Updated the links as well.

@kegilbert
Copy link
Contributor Author

Have a PR up to fix the pr-head failure: https://github.com/ARMmbed/mbed-os-cliapp/pull/436

If this is passed review we can remove the do no merge tag and move forward with the patch PR above to move this one along.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Considering if used as it was, would lead to a warning that can be easily eliminated and proper config set.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 3, 2018

Have a PR up to fix the pr-head failure: ARMmbed/mbed-os-cliapp#436

It's still not merged, any progress?

@kegilbert
Copy link
Contributor Author

kegilbert commented Aug 3, 2018

We have a bit of a chicken and egg issue with the CI, haven't heard back from Seppo on a recommended path forward (haven't pushed the issue to be fair, got caught up with other projects). The issue is I need the changes to go into Mbed OS so I can update the mbed_lib.json commit hash to include these changes in the mbed-cli repo so that can pass its CI. However I can't merge the changes here until the mbed-cli CI passes.

What I could do is rebase my changes in a separate branch and update the mbed_lib hash in mbed-cli with that branch but seems a bit jank to have master mbed-cli pointing to a branch of mbed-os. Thoughts?

@0xc0170

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 6, 2018

@SeppoTakalo or @tommikas would be better to advice here how to proceed.

@cmonr
Copy link
Contributor

cmonr commented Aug 6, 2018

@kegilbert Something you could do is update mbed-cli to this pr's head ref. I had to do something similar when updating mbed-cli for py3.

@kegilbert kegilbert force-pushed the mem-tracing-config-patch branch from e2b5541 to 9b53d12 Compare August 6, 2018 18:44
@kegilbert
Copy link
Contributor Author

kegilbert commented Aug 14, 2018

@cmonr This no longer has a dependency on the mbed-os-cliapp changes as those don't get built in pr-head right now. This is passing Travis, should I remove the do not merge tag? For after the patch release code freeze.

@cmonr
Copy link
Contributor

cmonr commented Aug 15, 2018

@kegilbert Ah, didn't realize that was the reason DNM was added (I should've added a note).
Sure, you can remove it since that's the case. I was going to suggest that since it's a breaking change, it should be targeted for 5.10 anyways.

@cmonr
Copy link
Contributor

cmonr commented Aug 24, 2018

@kegilbert @ARMmbed/mbed-os-test Does anything in CI need to be updates and/or disabled to test this PR? Will any changes be needed after it's merged?

@kegilbert
Copy link
Contributor Author

kegilbert commented Aug 24, 2018

@cmonr Only a docs update and patch note for the minor breaking change I believe, don't think this macro is used at the moment in Mbed OS tests outside of the one I changed in this PR:
https://github.com/ARMmbed/mbed-os/pull/7402/files#diff-9d0b4d826e1c32b0b1bfbe95983c8d8eR27

@kegilbert
Copy link
Contributor Author

@cmonr
Handbook update: ARMmbed/mbed-os-5-docs#684

@cmonr
Copy link
Contributor

cmonr commented Aug 27, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 27, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Aug 27, 2018

@0xc0170 0xc0170 requested a review from donatieng August 27, 2018 09:16
@mbed-ci
Copy link

mbed-ci commented Aug 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants