Skip to content

[lldb][NFC] Remove vestigial downstream changes related to ThreadPlan migration #10000

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

Conversation

felipepiovezan
Copy link

The initial implementation of swift async stepping involved migrating ThreadPlans from thread to thread. With the OS plugins introduced in 1, this is no longer needed and the associated code is dead.

To find the relevant diffs, files were compared with their upstream counterparts, and code mentioning the following concepts was deleted:

  • "synchronizing plans",
  • "detached plans",
  • "setting TIDs on a thread plan",
  • "activating a thread plan stack".

The storage for thread plan stacks had been substantially changed downstream to allow for the concepts above. This patch restores the original storage data structures.

These were the files compared:

  • ThreadPlanStack{.cpp, .h}
  • ThreadPlan{.cpp, .h}
  • Process{.cpp, .h}

@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan felipepiovezan changed the title [lldb][NFC] Remove downstream changes related to ThreadPlan migration [lldb][NFC] Remove vestigial downstream changes related to ThreadPlan migration Feb 11, 2025
@medismailben
Copy link

@felipepiovezan are there any remaining divergence related to swift async thread plans compared to upstream or are we matching upstream now ?

@felipepiovezan
Copy link
Author

@felipepiovezan are there any remaining divergence related to swift async thread plans compared to upstream or are we matching upstream now ?

AFAICT, we're matching it. But there could be changes in other files that I missed...

@kastiglione
Copy link

Is this understanding correct: this change isn't doing anything, it's entirely undoing?

@felipepiovezan
Copy link
Author

Is this understanding correct: this change isn't doing anything, it's entirely undoing?

That's right. Furthermore, it is NFC, this code is never reached.

Copy link

@jimingham jimingham left a comment

Choose a reason for hiding this comment

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

LGTM. The only possibly NFC bit is moving DoTraceLog from after ShouldStopSyncronous to after. I can't see how that would matter, however.

The GetTID, etc. on ThreadPlan and ThreadPlanStack are theoretically useful, but GetThread().GetTID() isn't much harder, so I don't think we need to preserve them either.

LGTM

@felipepiovezan felipepiovezan force-pushed the felipe/remove_migration_customizations branch from 0807bf3 to b661766 Compare February 11, 2025 22:51
The initial implementation of swift async stepping involved migrating
ThreadPlans from thread to thread. With the OS plugins introduced in
[1], this is no longer needed and the associated code is dead.

To find the relevant diffs, files were compared with their
upstream counterparts, and code mentioning the following concepts was
deleted:

* "synchronizing plans",
* "detached plans",
* "setting TIDs on a thread plan",
* "activating a thread plan stack".

The storage for thread plan stacks had been substantially changed
downstream to allow for the concepts above. This patch restores the
original storage data structures.

These were the files compared:

* ThreadPlanStack{.cpp, .h}
* ThreadPlan{.cpp, .h}
* Process{.cpp, .h}

[1]: swiftlang#9839
@felipepiovezan felipepiovezan force-pushed the felipe/remove_migration_customizations branch from b661766 to c8c7df7 Compare February 11, 2025 22:51
@felipepiovezan
Copy link
Author

rebased

@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan
Copy link
Author

@swift-ci test windows platform

@felipepiovezan felipepiovezan merged commit 106274e into swiftlang:stable/20240723 Feb 13, 2025
3 checks passed
@felipepiovezan felipepiovezan deleted the felipe/remove_migration_customizations branch February 13, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants