Commit 9971f4f
committed
Cython-code fix for the issue + optimization
line_profiler/_line_profiler.pyx::LineProfiler.add_function()
- Now making sure that ALL functions passed to the method will be
NOP-bytecode-padded, instead of from the 2nd one onwards
- No longer re-padding already NOP-bytecode-padded code objects
(could be by another profiler instance or even the same one);
this probably eliminates the need for keeping track on profiler
instances and leaves room for further optimizations
tests/test_line_profiler.py
::test_aggregate_profiling_data_between_code_versions()
- Updated test body to no longer test for bytecode alteration
(because there is no longer any)
- Added note in docstring stating the original context of the test
and how it is no longer relevant (or should we just delete this
test?)1 parent 4a4c4e8 commit 9971f4f
2 files changed
Lines changed: 33 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1142 | 1149 | | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1150 | 1171 | | |
1151 | 1172 | | |
1152 | 1173 | | |
| |||
1158 | 1179 | | |
1159 | 1180 | | |
1160 | 1181 | | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | 1182 | | |
1174 | 1183 | | |
1175 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1251 | 1256 | | |
1252 | 1257 | | |
1253 | 1258 | | |
| |||
1262 | 1267 | | |
1263 | 1268 | | |
1264 | 1269 | | |
1265 | | - | |
1266 | 1270 | | |
1267 | 1271 | | |
1268 | | - | |
1269 | 1272 | | |
1270 | 1273 | | |
1271 | 1274 | | |
| |||
0 commit comments