| Issue |
124749
|
| Summary |
inordinate memory usage and excessive build times with -O2 and -g
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
rnagy
|
While compiling Cython I've noticed that clang18 up to git HEAD, is using inordinate amounts of memory
while building with -O2 and -g.
Bisecting shows that the commit that causes the issue is 5d5583979179e3b0702888adf188b10831037758
I've attached a pre-processed file that can be used to reproduce the issue:
`$ /usr/bin/time -v clang -O2 -g -c Code.i -o Code.o`
Current status (virt memory hits 10G+):
```
Command being timed: "clang -O2 -g -c Code.i -o Code.o"
User time (seconds): 179.
[Code.i.gz](https://github.com/user-attachments/files/18574396/Code.i.gz)
34
System time (seconds): 4.36
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:03.73
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 8019468
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 2107773
Voluntary context switches: 1
Involuntary context switches: 774
Swaps: 0
File system inputs: 0
File system outputs: 11096
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
Maximum resident set size (kbytes): 8019468 (virt memory hits 10G+)
Before the offending commit:
```
Command being timed: "./build/bin/clang-17 -O2 -g -c Code.i -o Code.o"
User time (seconds): 36.03
System time (seconds): 0.44
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:36.48
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 517372
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 183869
Voluntary context switches: 1
Involuntary context switches: 148
Swaps: 0
File system inputs: 0
File system outputs: 11096
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs