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

Object model specs refactoring #367

Merged
merged 13 commits into from
Jul 8, 2021
Merged

Object model specs refactoring #367

merged 13 commits into from
Jul 8, 2021

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Jul 6, 2021

This PR adds specific types for each metadata spec in ObjectModel which predefines its scope and the length (number of bits). This PR also changes most of the methods related with MetadataSpec/SideMetadataSpec/HeaderMetadataSpec so they take a reference to the spec instead of the spec strut itself (which avoidings copying the spec when invoked without inlining).

Binding PRs:

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

v8-binding-test
V8_BINDING_REF=object-model-specs

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

openjdk-binding-test
OPENJDK_BINDING_REF=object-model-specs

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

jikesrvm-binding-test
JIKESRVM_BINDING_REF=object-model-specs

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

openjdk-microbm
OPENJDK_BINDING_BRANCH_REF=object-model-specs

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

openjdk-perf-compare
OPENJDK_BINDING_BRANCH_REF=object-model-specs

@qinsoon
Copy link
Member Author

qinsoon commented Jul 6, 2021

jikesrvm-perf-compare
JIKESRVM_BINDING_BRANCH_REF=object-model-specs

@qinsoon qinsoon added PR-benchmarking PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) labels Jul 6, 2021
@github-actions
Copy link

github-actions bot commented Jul 6, 2021

OpenJDK Micro Benchmarks

Running: ['rebench', 'microbm.conf', 'CI_SemiSpace']

Benchmark Trunk (ms) Branch (ms) Diff
BinaryTrees 1913.11 1906.11 -0.37%
Fasta 935.80 941.01 +0.56%
GCBenchMT 1436.48 1435.62 -0.06%
GCBenchST 107.82 107.83 +0.01%
ReverseComplement 52.47 52.71 +0.46%

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

OpenJDK Micro Benchmarks

Running: ['rebench', 'microbm.conf', 'CI_SemiSpace']

Benchmark Trunk (ms) Branch (ms) Diff
BinaryTrees 2594.61 2601.67 +0.27%
Fasta 1050.72 1042.58 -0.77%
GCBenchMT 1973.09 1968.16 -0.25%
GCBenchST 121.66 121.57 -0.07%
ReverseComplement 55.63 55.49 -0.27%

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

JikesRVM

NoGC (spanner-2021-07-06-Tue-134522)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 830.38 ±4.57 829.26 ±4.08 ⚠️ 1 removed 829.5 834.77 ±3.06 834.00 ±2.70 ⚠️ 1 removed 835.0 +0.53% +0.57%
fop 666.08 ±1.38 666.08 ±1.38 666.0 664.45 ±1.78 664.45 ±1.78 664.0 -0.24% -0.24%
luindex 2411.90 ±6.33 2411.90 ±6.33 2413.5 2412.28 ±4.67 2412.28 ±4.67 2415.0 +0.02% +0.02%

SemiSpace (spanner-2021-07-06-Tue-135805)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 665.83 ±3.67 665.83 ±3.67 663.0 667.48 ±5.16 666.15 ±4.53 ⚠️ 1 removed 663.5 +0.25% +0.05%
bloat 2414.55 ±33.65 2404.64 ±27.75 ⚠️ 1 removed 2406.0 2428.03 ±25.88 2428.03 ±25.88 2427.0 +0.56% +0.97%
fop 627.95 ±1.21 627.95 ±1.21 628.5 627.52 ±1.50 627.52 ±1.50 627.5 -0.07% -0.07%
hsqldb 697.92 ±5.33 696.51 ±4.63 ⚠️ 1 removed 697.0 703.60 ±10.42 698.69 ±3.27 ⚠️ 1 removed 698.0 +0.81% +0.31%
jython 1823.33 ±8.03 1823.33 ±8.03 1820.0 1829.62 ±7.48 1829.62 ±7.48 1830.0 +0.35% +0.35%
luindex 2450.45 ±9.73 2447.74 ±8.26 ⚠️ 1 removed 2454.0 2455.03 ±8.32 2455.03 ±8.32 2458.5 +0.19% +0.30%
lusearch 821.92 ±16.25 821.92 ±16.25 811.0 860.42 ±21.46 860.42 ±21.46 843.5 +4.68% +4.68% 🟥
pmd 1406.60 ±10.71 1406.60 ±10.71 1408.5 1423.42 ±9.80 1423.42 ±9.80 1427.0 +1.20% +1.20% 🟥
xalan 609.05 ±3.99 609.05 ±3.99 612.0 617.15 ±4.28 617.15 ±4.28 619.5 +1.33% +1.33% 🟥

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

JikesRVM

NoGC (spanner-2021-07-06-Tue-153745)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 831.00 ±3.89 831.00 ±3.89 830.5 837.95 ±3.91 837.95 ±3.91 835.5 +0.84% +0.84%
fop 663.33 ±1.58 663.33 ±1.58 663.0 666.35 ±1.65 666.35 ±1.65 666.0 +0.46% +0.46%
luindex 2411.62 ±7.05 2411.62 ±7.05 2411.5 2417.28 ±6.79 2417.28 ±6.79 2423.5 +0.23% +0.23%

SemiSpace (spanner-2021-07-06-Tue-155028)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 668.25 ±5.89 666.69 ±5.10 ⚠️ 1 removed 664.5 671.48 ±4.88 671.48 ±4.88 669.5 +0.48% +0.72%
bloat 2422.53 ±23.77 2422.53 ±23.77 2426.0 2456.50 ±26.14 2456.50 ±26.14 2442.5 +1.40% +1.40% 🟥
fop 628.00 ±1.21 628.00 ±1.21 628.0 626.70 ±1.17 626.70 ±1.17 626.0 -0.21% -0.21%
hsqldb 697.45 ±4.31 696.03 ±3.30 ⚠️ 1 removed 695.5 702.42 ±4.53 700.69 ±2.95 ⚠️ 1 removed 701.0 +0.71% +0.67%
jython 1826.00 ±9.62 1826.00 ±9.62 1823.5 1824.88 ±9.30 1822.62 ±8.31 ⚠️ 1 removed 1820.0 -0.06% -0.19%
luindex 2462.43 ±8.36 2462.43 ±8.36 2459.5 2458.38 ±6.25 2458.38 ±6.25 2458.5 -0.16% -0.16%
lusearch 827.85 ±17.44 827.85 ±17.44 826.5 826.33 ±15.20 826.33 ±15.20 816.5 -0.18% -0.18%
pmd 1407.85 ±11.08 1407.85 ±11.08 1412.0 1416.62 ±11.45 1416.62 ±11.45 1414.0 +0.62% +0.62%
xalan 612.48 ±3.16 612.48 ±3.16 615.5 614.88 ±4.21 614.88 ±4.21 617.5 +0.39% +0.39%

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

OpenJDK

SemiSpace (wrench-2021-07-06-Tue-132216)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 391.08 ±1.01 ⚠️ 4/40 failed 391.08 ±1.01 391.0 388.54 ±0.67 ⚠️ 3/40 failed 388.54 ±0.67 388.0 -0.65% -0.65%
eclipse 7495.35 ±36.73 7482.54 ±26.73 ⚠️ 1 removed 7481.0 7485.98 ±44.69 7467.28 ±24.47 ⚠️ 1 removed 7480.0 -0.13% -0.20%
fop 476.60 ±0.73 476.60 ±0.73 476.0 475.73 ±0.75 475.73 ±0.75 476.0 -0.18% -0.18%
hsqldb 432.30 ±1.50 432.30 ±1.50 432.5 435.60 ±2.36 434.90 ±1.94 ⚠️ 1 removed 435.0 +0.76% +0.60%
pmd 1225.88 ±4.11 1225.88 ±4.11 1222.0 1225.92 ±5.89 1223.41 ±3.04 ⚠️ 1 removed 1222.0 +0.00% -0.20%

GenCopy (wrench-2021-07-06-Tue-152814)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 401.88 ±0.51 401.88 ±0.51 401.0 401.76 ±1.76 ⚠️ 2/40 failed 401.76 ±1.76 403.0 -0.03% -0.03%
eclipse 7917.23 ±26.81 7917.23 ±26.81 7914.0 7902.32 ±15.52 7896.67 ±10.77 ⚠️ 1 removed 7913.5 -0.19% -0.26%
fop 483.38 ±0.72 483.38 ±0.72 483.0 483.52 ±0.82 483.52 ±0.82 483.0 +0.03% +0.03%
hsqldb 373.85 ±3.31 372.85 ±2.69 ⚠️ 1 removed 374.0 370.73 ±2.10 370.73 ±2.10 372.0 -0.84% -0.57%
pmd 1449.00 ±12.92 1449.00 ±12.92 1448.5 1457.80 ±16.16 1457.80 ±16.16 1454.5 +0.61% +0.61%

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

OpenJDK

SemiSpace (wrench-2021-07-06-Tue-173914)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 392.14 ±0.92 ⚠️ 5/40 failed 392.14 ±0.92 392.0 389.14 ±0.71 ⚠️ 4/40 failed 389.14 ±0.71 389.0 -0.77% -0.77%
eclipse 7515.73 ±55.87 7481.05 ±27.65 ⚠️ 2 removed 7481.0 7460.20 ±45.72 7439.33 ±18.04 ⚠️ 1 removed 7474.0 -0.74% -0.56%
fop 476.12 ±0.77 476.12 ±0.77 476.0 475.27 ±0.82 475.05 ±0.71 ⚠️ 1 removed 475.0 -0.18% -0.23%
hsqldb 433.98 ±1.71 433.98 ±1.71 435.0 436.20 ±2.14 435.56 ±1.76 ⚠️ 1 removed 435.5 +0.51% +0.37%
pmd 1226.85 ±3.94 1225.87 ±3.50 ⚠️ 1 removed 1225.5 1224.55 ±3.06 1223.69 ±2.59 ⚠️ 1 removed 1223.5 -0.19% -0.18%

GenCopy (wrench-2021-07-06-Tue-194428)

Benchmark Trunk(ms) Branch(ms) Diff
mean mean without outliers median mean mean without outliers median mean mean without outliers
antlr 402.02 ±1.49 402.02 ±1.49 402.0 403.18 ±0.77 402.95 ±0.64 ⚠️ 1 removed 403.0 +0.29% +0.23%
eclipse 7885.18 ±16.02 ⚠️ 1/40 failed 7885.18 ±16.02 7876.0 7911.60 ±17.20 7906.21 ±13.65 ⚠️ 1 removed 7915.0 +0.34% +0.27%
fop 483.68 ±0.62 483.68 ±0.62 484.0 484.07 ±0.86 483.87 ±0.77 ⚠️ 1 removed 483.5 +0.08% +0.04%
hsqldb 371.38 ±2.30 371.38 ±2.30 371.5 371.32 ±2.60 371.32 ±2.60 371.5 -0.01% -0.01%
pmd 1468.50 ±17.29 1468.50 ±17.29 1454.0 1462.45 ±15.52 1458.33 ±13.45 ⚠️ 1 removed 1458.0 -0.41% -0.69%

@qinsoon qinsoon marked this pull request as ready for review July 7, 2021 00:21
@qinsoon qinsoon requested a review from javadamiri July 7, 2021 00:21
src/plan/global.rs Outdated Show resolved Hide resolved
is_global: Self::IS_GLOBAL,
offset,
log_num_of_bits: Self::LOG_NUM_BITS,
log_min_obj_size,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log_min_obj_size is always LOG_BYTES_IN_WORD for all vm_metadata, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that's not true for LOS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the only info we need from a binding for side metadata specs is the offset. Everything else can be defined in mmtk-core for each spec.

Copy link
Contributor

@javadamiri javadamiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinsoon qinsoon removed PR-benchmarking PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) labels Jul 7, 2021
@qinsoon qinsoon added the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Jul 7, 2021
@qinsoon qinsoon merged commit 1e79646 into master Jul 8, 2021
@qinsoon qinsoon deleted the object-model-specs branch July 8, 2021 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants