Commit b8c1c50
fix PSS graph on recent kernels
It seems the smaps file layout in /proc changed in some kernel version.
This commit fix it by:
- Using smaps_rollup (available since kernel 4.14) instead of smaps to
avoid having to loop over all entries (smaps_rollup being a summary
of smaps).
- If smaps_rollup is not available (kernel < 4.14), use smaps instead as
before and sum all PSS lines.
- Searching "Pss:" instead of using hardcoded offsets (which will
probably go wrong again in the future).
Fixes: #461 parent 93609bf commit b8c1c50
1 file changed
Lines changed: 19 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
489 | 488 | | |
490 | 489 | | |
491 | 490 | | |
492 | | - | |
| 491 | + | |
| 492 | + | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
494 | 499 | | |
495 | | - | |
| 500 | + | |
496 | 501 | | |
497 | 502 | | |
498 | 503 | | |
499 | | - | |
| 504 | + | |
500 | 505 | | |
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | 509 | | |
505 | 510 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
541 | 521 | | |
542 | 522 | | |
543 | 523 | | |
| |||
0 commit comments