Skip to content

Commit

Permalink
Test jit-max-code-size on multi-section and base code allocators
Browse files Browse the repository at this point in the history
Summary: Add testing for the multi-section and base allocators.

Reviewed By: alexmalyshev

Differential Revision: D55917127

fbshipit-source-id: 9e0d5b875a99b28612bae4071d4d3e466cc98abb
  • Loading branch information
SonicField authored and facebook-github-bot committed Apr 10, 2024
1 parent 2d763aa commit ccd30be
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions cinderx/PythonLib/test_cinderx/test_cinderjit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4378,8 +4378,42 @@ def onek_asserts(actual_stdout):
# allocation is; we assume < 200K.
self.assertLess(used_size, 1024 * 200)

run_test(zero_asserts, ["-X", f"jit-max-code-size=0"])
run_test(onek_asserts, ["-X", f"jit-max-code-size=1024"])
run_test(zero_asserts, ["-X", "jit-max-code-size=0"])
run_test(
zero_asserts,
["-X", "jit-max-code-size=0", "-X", "jit-disable-huge-pages"],
)
run_test(
zero_asserts,
[
"-X",
"jit-max-code-size=0",
"-X",
"jit-multiple-code-sections=1",
"-X",
"jit-hot-code-section-size=1048576",
"-X",
"jit-cold-code-section-size=1048576",
],
)
run_test(onek_asserts, ["-X", "jit-max-code-size=1024"])
run_test(
onek_asserts,
["-X", "jit-max-code-size=1024", "-X", "jit-disable-huge-pages"],
)
run_test(
onek_asserts,
[
"-X",
"jit-max-code-size=1024",
"-X",
"jit-multiple-code-sections=1",
"-X",
"jit-hot-code-section-size=1048576",
"-X",
"jit-cold-code-section-size=1048576",
],
)

def test_max_code_size_fast(self):
code = textwrap.dedent(
Expand Down

0 comments on commit ccd30be

Please sign in to comment.