Skip to content
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

Elevated memory usage in def-use #4872

Open
asl opened this issue Aug 16, 2024 · 2 comments
Open

Elevated memory usage in def-use #4872

asl opened this issue Aug 16, 2024 · 2 comments
Labels
compiler-performance Topics on improving the performance of the compiler core.

Comments

@asl
Copy link
Contributor

asl commented Aug 16, 2024

We are seeing terrible elevated memory usage in def-use.

We start like this:

    PassRepeated invoking DoSimplifyDefUse
      ProcessDefUse invoking P4::ComputeWriteSet
      heap after P4::ComputeWriteSet: in use 758MB, max 837MB
      ProcessDefUse invoking P4::(anonymous namespace)::FindUninitialized
      heap after P4::(anonymous namespace)::FindUninitialized: in use 758MB, max 837MB

and end like this:

heap after SimplifyDefUse: in use 9.2GB, max 9.3GB

Note that in the reality the heap mem size query triggers GC collection. In the reality the peak memory usage could be well beyond 16 Gb.

I do not know yet the culprit, still investigating.

@asl
Copy link
Contributor Author

asl commented Aug 16, 2024

Tagging @ChrisDodd

@asl asl added the compiler-performance Topics on improving the performance of the compiler core. label Aug 16, 2024
@asl
Copy link
Contributor Author

asl commented Aug 16, 2024

The usual suspect:

Allocated a total of 2.7GB memory
allocated 737MB in 5576175 calls from:
  4   p4c                       0x0000000102ff5234 _ZNK2P411Definitions15joinDefinitionsEPKS0_ + 440 0x102ff5234
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-performance Topics on improving the performance of the compiler core.
Projects
None yet
Development

No branches or pull requests

1 participant