Skip to content

Fix sleep tracing not finding matching driver during unlock. #9685

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 Feb 14, 2019
Merged

Fix sleep tracing not finding matching driver during unlock. #9685

merged 1 commit into from Feb 14, 2019

Conversation

ghost
Copy link

@ghost ghost commented Feb 12, 2019

Sleep tracing lookup was broken when the code was refactored during one of the commits. Revert the breaking commit.

Reverted commit: 9a0e879.

Fixes: #8205

Pull request type

    [X] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change

Reviewers

@TacoGrandeTX

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2019

What did actually break it ?

@ciarmcom ciarmcom requested review from TacoGrandeTX and a team February 12, 2019 16:00
@ciarmcom
Copy link
Member

@scartmell-arm, thank you for your changes.
@TacoGrandeTX @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@ciarmcom
Copy link
Member

@scartmell-arm, thank you for your changes.
@TacoGrandeTX @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

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

Change looks good, it will be good to add a test case (failing one)
@TacoGrandeTX - Please share the use case where it was failing, and also please verify the fix

@TacoGrandeTX
Copy link
Contributor

TacoGrandeTX commented Feb 12, 2019

I tested this with the same test program here: #8205

On the K64F it hard faulted and on the nRF52_DK the output was wrong.

It appears we missed this part of the revert:
https://github.com/ARMmbed/mbed-os/blob/0f6b73ae0f30d4aab8617fe62a6cc469bc5a352b/hal/mbed_sleep_manager.c#L37:L40
When I bring that in, I see proper output for the test:

LOCK: Timer.cpp, ln: 55, lock count: 1
Sleep locks held:
[id: Timer.cpp, count: 1]
...
Sleep locks held:
[id: Timer.cpp, count: 1]
UNLOCK: Timer.cpp, ln: 69, lock count: 0
Sleep locks held:
Sleep locks held:

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

@scartmell-arm 👍 to your past self for the older commit mesasge.

Helps to make a quick before/after comparison.

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

CI started

@deepikabhavnani
Copy link

deepikabhavnani commented Feb 13, 2019

@cmonr - This needs work
On the K64F it hard faulted and on the nRF52_DK the output was wrong.
It appears we missed this part of the revert:

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

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

Identifier should be char identifier[IDENTIFIER_WIDTH]; instead of const char *
Not sure why, I don't see a push commit in between and still code is fixed

Not fixed - Should allocate memory for string storage
https://github.com/ARMmbed/mbed-os/pull/9685/files#diff-e755578b30cfd39589b0f0a179cc520bR83

@mbed-ci
Copy link

mbed-ci commented Feb 13, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@ghost
Copy link
Author

ghost commented Feb 13, 2019

Sorry, not sure how I missed that part. Fixed.

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 14, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 1492dc1 into ARMmbed:master Feb 14, 2019
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