Commit c4877cc
committed
[memprof] Upgrade a unit test to Version 3
I'm planning to remove MemProf Version 1, which is a maintenance
burden because it uses a different set of struct fields in
IndexedAllocationInfo and IndexedMemProfRecord compared to Version 2
and 3. (FWIW, Version 2 and 3 are much closer to each other.)
Before we remove the old version, we need to upgrade
test_memprof_merge to Version 3. Here are some remarks:
- Without this patch, we call Writer.addMemProfFrame, which I don't
think is correct. This way, we are adding IndexedMemProfRecord to
Writer2 without any frame. I'm changing that to
Writer2.addMemProfFrame.
- This patch adds a call to getCallStackMapping. Version 2 and 3
require a map from call stack IDs to call stacks.
- I'm calling makeRecordV2 instead of makeRecord to populate the
struct fields used by Version 2 and 3.
- Version 1 uses MemProfRecord::MemProfRecord (that is, a constructor)
to convert IndexedMemProfRecord to MemProfRecord. Version 2 and 3
use MemProfRecord::toMemProfRecord, a member function, to do the
same task.1 parent abbb0d9 commit c4877cc
1 file changed
+16
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| 680 | + | |
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | 684 | | |
694 | 685 | | |
695 | | - | |
| 686 | + | |
696 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
697 | 696 | | |
698 | 697 | | |
699 | 698 | | |
700 | 699 | | |
701 | 700 | | |
702 | 701 | | |
| 702 | + | |
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
725 | 720 | | |
726 | | - | |
| 721 | + | |
| 722 | + | |
727 | 723 | | |
728 | 724 | | |
729 | 725 | | |
| |||
0 commit comments