-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1339 from marschall/fix-wamemory
Fix WAMemory on Pharo
- Loading branch information
Showing
25 changed files
with
92 additions
and
36 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...Seaside-Pharo-Development.package/Behavior.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"classes are in the global pool, ignore counting them" | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/Behavior.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "Behavior" | ||
} |
4 changes: 4 additions & 0 deletions
4
.../Seaside-Pharo-Development.package/Boolean.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"booleans are singletons, ignore counting them" | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/Boolean.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "Boolean" | ||
} |
6 changes: 6 additions & 0 deletions
6
...de-Pharo-Development.package/CompiledBlock.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"blocks can be stored in collections and instance variables | ||
Report but don't intropect them. This may miss reporting catured variables." | ||
aMemory accumulate: self. | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/CompiledBlock.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "CompiledBlock" | ||
} |
4 changes: 4 additions & 0 deletions
4
...e-Pharo-Development.package/CompiledMethod.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"methods are stored in classes, ignore counting them" | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/CompiledMethod.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "CompiledMethod" | ||
} |
6 changes: 0 additions & 6 deletions
6
...aro-Development.package/InstructionStream.extension/instance/traversableInstVarIndexes.st
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...haro-Development.package/InstructionStream.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"we only have two instance variables: | ||
- sender which we ignore because will always get niled out when the stack unwound so won't be captured but this will not have happened yet for contexts involved in the current request | ||
- pc with is a SmallInteger and therefore immediate" | ||
aMemory accumulate: self. | ||
anIdentitySet add: self |
3 changes: 0 additions & 3 deletions
3
...ide-Pharo-Development.package/Object.extension/instance/traversableIndexableVarIndexes.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
.../Seaside-Pharo-Development.package/Object.extension/instance/traversableInstVarIndexes.st
This file was deleted.
Oops, something went wrong.
12 changes: 9 additions & 3 deletions
12
...y/Seaside-Pharo-Development.package/Object.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
.../Seaside-Pharo-Development.package/Process.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"Process is excluded because otherwise our Semaphores pull them in and the Process is | ||
obviously not held onto by the Semaphore indefinitely." | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/Process.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "Process" | ||
} |
4 changes: 4 additions & 0 deletions
4
...y/Seaside-Pharo-Development.package/Symbol.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"symbol are in the global table, ignore counting them" | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/Symbol.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "Symbol" | ||
} |
4 changes: 4 additions & 0 deletions
4
...-Pharo-Development.package/UndefinedObject.extension/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-Pharo-Development | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"nil is global, ignore counting it" | ||
anIdentitySet add: self |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Pharo-Development.package/UndefinedObject.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name" : "UndefinedObject" | ||
} |
8 changes: 0 additions & 8 deletions
8
repository/Seaside-Pharo-Development.package/WAMemory.class/class/initialize.st
This file was deleted.
Oops, something went wrong.
23 changes: 14 additions & 9 deletions
23
repository/Seaside-Pharo-Development.package/WAMemory.class/instance/buildTable.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
private | ||
buildTable | ||
^ WATableReport new | ||
rows: instances values; | ||
columns: (Array | ||
with: (WAReportColumn new | ||
| classColumn instanceCountColumn totalSizeColumn | | ||
classColumn := WAReportColumn new | ||
title: 'Class'; | ||
selector: #name; | ||
sortBlock: [ :a :b | a < b ]; | ||
yourself) | ||
with: (WAReportColumn new | ||
yourself. | ||
instanceCountColumn := WAReportColumn new | ||
title: 'Instances'; | ||
selector: #count; | ||
sortBlock: [ :a :b | a > b ]; | ||
cssClass: 'right'; | ||
hasTotal: true; | ||
yourself) | ||
with: (WAReportColumn new | ||
yourself. | ||
totalSizeColumn := WAReportColumn new | ||
title: 'Total Size'; | ||
selector: #size; | ||
sortBlock: [ :a :b | a > b ]; | ||
formatBlock: [ :each | formatter print: each ]; | ||
cssClass: 'right'; | ||
hasTotal: true; | ||
yourself)); | ||
yourself. | ||
^ WATableReport new | ||
rows: instances values; | ||
columns: (Array | ||
with: classColumn | ||
with: instanceCountColumn | ||
with: totalSizeColumn); | ||
sortColumn: totalSizeColumn; | ||
yourself |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverse.value.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
private | ||
traverse: anObject value: aValue seen: anIdentitySet | ||
(aValue isNil or: [ aValue isLiteral or: [ aValue isBehavior or: [ (anIdentitySet includes: aValue) or: [ IgnoredClasses anySatisfy: [ :each | aValue isKindOf: each ] ] ] ] ]) | ||
(aValue isNil or: [ anIdentitySet includes: aValue ]) | ||
ifTrue: [ ^ self ]. | ||
aValue traverseWithMemory: self seen: anIdentitySet |
4 changes: 4 additions & 0 deletions
4
...ory/Seaside-Pharo-Development.package/WAMemory.class/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
hooks | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"don't report self" | ||
anIdentitySet add: self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...Seaside-Pharo-Development.package/WAMemoryItem.class/instance/traverseWithMemory.seen..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
hooks | ||
traverseWithMemory: aMemory seen: anIdentitySet | ||
"don't report self" | ||
anIdentitySet add: self |