Skip to content

Conversation

@bhufmann
Copy link
Contributor

@bhufmann bhufmann commented Apr 11, 2025

What it does

Remove any instances of derived data providers and sub-data providers created with InAndAnalysis.

fixes #178

Requires the following Trace Compass PRs:

How to test

  1. Create custom InAndOut using tsp-python-client
  2. Open InAndOut call stack view from vscode-trace-extension
  3. Delete custom InAndOut using tsp-python-client
  4. Re-create same custom InAndOut as in 1)
  5. Open InAndOut call stack view from vscode-trace-extension
  6. The view is not empty

Note: The same issue exists for the 3 other derived views and it is fixed with this PR.

Follow-ups

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Signed-off-by: Bernd Hufmann [email protected]

@bhufmann bhufmann force-pushed the removeDpFromManager branch 2 times, most recently from 1701206 to 0512250 Compare April 14, 2025 13:53
@bhufmann bhufmann changed the title Remove dp from manager Remove customized data providers from manager (general and InAndOut) Apr 14, 2025
@bhufmann bhufmann changed the title Remove customized data providers from manager (general and InAndOut) Remove customized data providers from manager Apr 14, 2025
@bhufmann bhufmann force-pushed the removeDpFromManager branch from 0512250 to 028b651 Compare April 16, 2025 15:16
InAndOutAnalysisModule.remove(config, trace);
}

private static void removeChildrenDataProviders(ITmfTrace trace, ITmfConfiguration config) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I like this implementation a lot better. But I can't help but think that this would need to be done by all factories that support configurations. It could have been the new API in DataProviderManager: removeProviders(ITmfTrace, ITmfConfiguration), that would remove all data providers that have this configuration, instead of per data provider id.

I also wonder if, in this implementation, the first call to the method would also cover the removal of the data provider that is being explicitly removed by the DataProviderService in the previous commit.

So I'm thinking, in DataProviderService.deleteDerivedProvider(), could it just call something like DataProviderManager.removeProviders(ITmfTrace, ITmfConfiguration), and then the configurators/factories only need to worry about removing the descriptor and configuration? They are not really the owners of the data provider instances.

One consideration is that either DataProviderService or DataProviderManager would need to do this processing for the full trace set (experiment and its child traces).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting comment. It's the same idea than for the first commit, but it would take care of all sub data providers. I'll try it. It requires another change in mainline TC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created eclipse-tracecompass/org.eclipse.tracecompass#257 and apply in this PR.

@bhufmann bhufmann force-pushed the removeDpFromManager branch from 028b651 to a726160 Compare April 17, 2025 01:51
@bhufmann bhufmann force-pushed the removeDpFromManager branch from a726160 to 152cad2 Compare April 17, 2025 17:59
@bhufmann bhufmann merged commit 48b9008 into eclipse-tracecompass-incubator:master Apr 17, 2025
2 checks passed
@bhufmann bhufmann deleted the removeDpFromManager branch April 17, 2025 18:11
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.

Custom InAndOutDataProvider not removed from DataProviderManager

2 participants