Skip to content

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Sep 15, 2022

The memory profiling scheme was added by @mpardalos. It works by stopping the world and traversing the heap using the heapsize package, but it breaks if a GC starts halfway, leading to a segfault.

Nowadays we have a better tool for this sort of analysis, ghc-debug, which snapshots the heap and performs the analysis offline.

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM! Doesn't it still have merits for debugging performance issues on ghc versions that have no ghc-debug support? Or doesnt this happen anyway?

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

(Is this PR misnamed?)

@pepeiborra
Copy link
Collaborator Author

(Is this PR misnamed?)

Oops. I have been using the VSCode GitHub extension to create PRs and maybe it automatically reuses prior titles

@pepeiborra pepeiborra changed the title Filter out unworthy names remove manual heap profiling from ghcide Sep 15, 2022
@pepeiborra
Copy link
Collaborator Author

LGTM! Doesn't it still have merits for debugging performance issues on ghc versions that have no ghc-debug support? Or doesnt this happen anyway?

Just use 9.2 or higher to analyse memory, there is no reason to support analysis in older versions

@michaelpj
Copy link
Collaborator

Build failures on 9.4

@pepeiborra pepeiborra merged commit a13e1b3 into master Sep 18, 2022
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.

3 participants