-
-
Notifications
You must be signed in to change notification settings - Fork 706
chore(core): exclude all_modules.py
bytecode from frozen_mpy.c
#4836
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
Merged
Conversation
This file contains hidden or 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
Following trezor/micropython#15. [no changelog]
|
See `all_modules.py.mako` for more details. [no changelog]
2848d71
to
63a17ea
Compare
Comparing --- /tmp/f1.c 2025-03-27 09:19:20.841171236 +0200
+++ /tmp/f2.c 2025-03-27 10:34:24.118286276 +0200
@@ -325730,14 +321576,14 @@
/*
byte sizes:
qstr content: 5533 unique, 110213 bytes
-bc content: 277527
-const str content: 25973
+bc content: 269598
+const str content: 25941
const int content: 422
-const obj content: 14356
+const obj content: 14340
const table qstr content: 0 entries, 0 bytes
-const table ptr content: 1756 entries, 7024 bytes
-raw code content: 3007 * 4 = 48112
-mp_frozen_mpy_names_content: 11173
-mp_frozen_mpy_content_size: 1516
-total: 496316
+const table ptr content: 1755 entries, 7020 bytes
+raw code content: 3006 * 4 = 48096
+mp_frozen_mpy_names_content: 11158
+mp_frozen_mpy_content_size: 1512
+total: 488300
*/ |
the important part is, are the qstrings still collected? |
Yes, there is no diff in the qstr section - only the bytecode of extern const qstr_pool_t mp_qstr_const_pool;
const qstr_pool_t mp_qstr_frozen_const_pool = {
&mp_qstr_const_pool, // previous pool
MP_QSTRnumber_of, // previous pool size
10, // allocated entries
5533, // used entries
(qstr_hash_t *)mp_qstr_frozen_const_hashes,
(qstr_len_t *)mp_qstr_frozen_const_lengths,
{
"all_modules.py",
"trezor.utils",
"utils",
"trezor",
"all_modules",
"boot",
"session",
"usb",
"storage",
"cache",
"storage.cache",
"cache_codec",
"storage.cache_codec",
"cache_common",
"storage.cache_common",
"storage.common",
"debug",
"storage.debug",
"device",
"storage.device",
"fido2",
"storage.fido2",
"storage.recovery",
"recovery_shares",
"storage.recovery_shares",
"resident_credentials",
"storage.resident_credentials",
... |
matejcik
approved these changes
Mar 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
core
Trezor Core firmware. Runs on Trezor Model T and T2B1.
micropython
Python interpreter and runtime that runs Trezor firmware
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also, bump MicroPython dependency following trezor/micropython#15 and trezor/micropython#16.