<div dir="ltr">To conclude gperftools topic:<div><br></div><div>The following commit drops local rosetta patch, as well as another patch, since both issues are fixed in upstream.</div><div>It also fixes a broken tests target and updates the port to 2.15.</div><div><a href="https://github.com/macports/macports-ports/pull/22097/commits/005cd16fae819210578ac2ccdc9b9775dbc06b95">https://github.com/macports/macports-ports/pull/22097/commits/005cd16fae819210578ac2ccdc9b9775dbc06b95</a><br></div><div><br></div><div>CMake build system does not work nicely for tests with this port, but with makefiles build of 2.15 release results are:</div><div>14.2.1 arm64: <span style="font-family:"Helvetica Neue";font-size:13px">PASS:</span><span class="gmail-Apple-converted-space" style="font-family:"Helvetica Neue";font-size:13px"> </span><span style="font-family:"Helvetica Neue";font-size:13px">43 FAIL:</span><span class="gmail-Apple-converted-space" style="font-family:"Helvetica Neue";font-size:13px"> </span><span style="font-family:"Helvetica Neue";font-size:13px">3</span></div><div>10.6 ppc: <span style="font-size:13px;font-family:"Helvetica Neue"">PASS:</span><span class="gmail-Apple-converted-space" style="font-size:13px;font-family:"Helvetica Neue""> <span class="gmail-Apple-converted-space"> </span></span><span style="font-size:13px;font-family:"Helvetica Neue"">39 FAIL:</span><span class="gmail-Apple-converted-space" style="font-size:13px;font-family:"Helvetica Neue""> <span class="gmail-Apple-converted-space"> </span></span><span style="font-size:13px;font-family:"Helvetica Neue"">7</span></div><div><br></div><div><span style="font-size:13px;font-family:"Helvetica Neue"">Looks like I did not cause any </span>“wreckage” after all, and 10.6 ppc with makefiles (which was the system I used back then, when added support for tests for this port) performs better than Sonoma with CMake. (No exaggeration, it is literally the case: with CMake 12 tests fail on 14.2.1.)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 9, 2024 at 8:34 PM Sergey Fedorov <<a href="mailto:vital.had@gmail.com">vital.had@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">So, to Ken’s claim re gperftools.<div><br></div><div>> And now there it sits in the ports tree, a useless MacPorts-only patch, just waiting to break something.</div><div><br></div><div>To begin with, this is a false statement. The patch is NOT MacPorts-only but backported from the upstream. Of course, Ken did not bother to take a look.</div><div>Here it is in the master: <a href="https://github.com/gperftools/gperftools/blob/365060c4213a48adb27f63d5dfad41b3dfbdd62e/src/libc_override_osx.h#L274-L283" target="_blank">https://github.com/gperftools/gperftools/blob/365060c4213a48adb27f63d5dfad41b3dfbdd62e/src/libc_override_osx.h#L274-L283</a></div><div><br></div><div>> Would it still work properly on 10.6 Intel?</div><div><br></div><div>Ironically, since the build system was switched to experimental CMake (not by me), tests target is just broken. Apparently no one ever tried to run tests for it, despite such a great concern that my fix for PPC could have broken something.</div><div>This commit switched the build system:</div><div><a href="https://github.com/macports/macports-ports/commit/7375653e34deb7d53d4223fcb81cf1aaadf8f963" target="_blank">https://github.com/macports/macports-ports/commit/7375653e34deb7d53d4223fcb81cf1aaadf8f963</a><br></div><div><br></div><div>I ran tests on 10.6.8 x86_64 (default clang etc.) now from makefiles build, with and without my patch. Some tests fail, but regardless of adding the patch (that is, same tests fail).</div><div>I also tried to run tests with CMake build system after fixing the target, and nearly same failures happen, though tcmalloc_unittest fails with CMake but passes with makefiles.</div><div>In all three cases getpc_test either freezes or gonna take forever, and I have no time to wait right now.</div><div><br></div><div>So far I can see that a move to CMake did break some stuff, but my patch is inconsequential.</div><div><br></div><div>> Does it work at all on 10.6 for PPC? Who can tell?</div><div><br></div><div>Certainly you could try running tests and tell us, since you somehow find sufficient time to discourage supporting PPC.</div><div>But anyway, this is from makefiles build on 10.6.8 Rosetta:</div><div><br></div><div>:info:test /usr/bin/make pprof_unittest<br>:info:test ./src/pprof -test<br>:info:test AddressAdd 32-bit tests: 5 passes, 0 failures<br>:info:test AddressAdd 64-bit tests: 10 passes, 0 failures<br>:info:test AddressSub 32-bit tests: 5 passes, 0 failures<br>:info:test AddressSub 64-bit tests: 10 passes, 0 failures<br>:info:test AddressInc 32-bit tests: 5 passes, 0 failures<br>:info:test AddressInc 64-bit tests: 10 passes, 0 failures<br>:info:test PASS<br>:info:test /usr/bin/make check-TESTS<br>:info:test ./src/pprof -test<br>:info:test AddressAdd 32-bit tests: 5 passes, 0 failures<br>:info:test AddressAdd 64-bit tests: 10 passes, 0 failures<br>:info:test AddressSub 32-bit tests: 5 passes, 0 failures<br>:info:test AddressSub 64-bit tests: 10 passes, 0 failures<br>:info:test AddressInc 32-bit tests: 5 passes, 0 failures<br>:info:test AddressInc 64-bit tests: 10 passes, 0 failures<br>:info:test PASS<br>:info:test PASS: low_level_alloc_unittest<br>:info:test PASS: atomicops_unittest<br>:info:test ./test-driver: line 112: 40951 Abort trap "$@" >> "$log_file" 2>&1<br>:info:test FAIL: stacktrace_unittest<br>:info:test PASS: tcmalloc_minimal_unittest<br>:info:test PASS: tcm_min_asserts_unittest<br>:info:test PASS: tcmalloc_minimal_large_unittest<br>:info:test PASS: tcmalloc_minimal_large_heap_fragmentation_unittest<br>:info:test PASS: addressmap_unittest<br>:info:test PASS: system_alloc_unittest<br>:info:test PASS: packed_cache_test<br>:info:test PASS: frag_unittest<br>:info:test PASS: markidle_unittest<br>:info:test PASS: current_allocated_bytes_test<br>:info:test PASS: malloc_hook_test<br>:info:test PASS: malloc_extension_test<br>:info:test PASS: malloc_extension_c_test<br>:info:test PASS: page_heap_test<br>:info:test PASS: pagemap_unittest<br>:info:test PASS: realloc_unittest<br>:info:test PASS: stack_trace_table_test<br>:info:test PASS: thread_dealloc_unittest<br>:info:test PASS: tcmalloc_minimal_debug_unittest<br>:info:test PASS: malloc_extension_debug_test<br>:info:test PASS: realloc_debug_unittest<br>:info:test rm -f debugallocation_test.sh<br>:info:test cp -p ./src/tests/debugallocation_test.sh debugallocation_test.sh<br>:info:test FAIL: debugallocation_test.sh<br>:info:test rm -f tcmalloc_unittest.sh<br>:info:test cp -p ./src/tests/tcmalloc_unittest.sh tcmalloc_unittest.sh<br>:info:test FAIL: tcmalloc_unittest.sh<br>:info:test PASS: tcm_asserts_unittest<br>:info:test PASS: tcmalloc_large_unittest<br>:info:test PASS: tcmalloc_large_heap_fragmentation_unittest<br>:info:test PASS: raw_printer_test<br>:info:test PASS: sampler_test<br>:info:test rm -f sampling_test.sh<br>:info:test cp -p ./src/tests/sampling_test.sh sampling_test.sh<br>:info:test FAIL: sampling_test.sh<br>:info:test rm -f heap-profiler_unittest.sh<br>:info:test cp -p ./src/tests/heap-profiler_unittest.sh heap-profiler_unittest.sh<br>:info:test FAIL: heap-profiler_unittest.sh<br>:info:test PASS: simple_compat_test<br>:info:test PASS: tcmalloc_debug_unittest<br>:info:test PASS: sampler_debug_test<br>:info:test rm -f sampling_debug_test.sh<br>:info:test cp -p ./src/tests/sampling_test.sh sampling_debug_test.sh<br>:info:test FAIL: sampling_debug_test.sh<br>:info:test rm -f heap-profiler_debug_unittest.sh<br>:info:test cp -p ./src/tests/heap-profiler_unittest.sh heap-profiler_debug_unittest.sh<br>:info:test FAIL: heap-profiler_debug_unittest.sh<br></div><div><br></div><div>This is on 10.6.8 x86_64:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test /usr/bin/make<span> </span>pprof_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./src/pprof -test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressAdd 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressAdd 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressSub 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressSub 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressInc 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressInc 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test /usr/bin/make<span> </span>check-TESTS</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./src/pprof -test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressAdd 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressAdd 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressSub 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressSub 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressInc 32-bit tests: 5 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test AddressInc 64-bit tests: 10 passes, 0 failures</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: low_level_alloc_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: atomicops_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: stacktrace_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_minimal_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcm_min_asserts_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_minimal_large_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_minimal_large_heap_fragmentation_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: addressmap_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: system_alloc_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: packed_cache_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: frag_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: markidle_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: current_allocated_bytes_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: malloc_hook_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: malloc_extension_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: malloc_extension_c_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: page_heap_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: pagemap_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: realloc_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: stack_trace_table_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: thread_dealloc_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./test-driver: line 112: 38625 Abort trap<span> </span>"$@" >> "$log_file" 2>&1</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test FAIL: tcmalloc_minimal_debug_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./test-driver: line 112: 38645 Abort trap<span> </span>"$@" >> "$log_file" 2>&1</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test FAIL: malloc_extension_debug_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./test-driver: line 112: 38664 Abort trap<span> </span>"$@" >> "$log_file" 2>&1</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test FAIL: realloc_debug_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f debugallocation_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/debugallocation_test.sh debugallocation_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test FAIL: debugallocation_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f tcmalloc_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/tcmalloc_unittest.sh tcmalloc_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcm_asserts_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_large_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: tcmalloc_large_heap_fragmentation_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: raw_printer_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: sampler_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f sampling_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/sampling_test.sh sampling_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: sampling_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f heap-profiler_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/heap-profiler_unittest.sh heap-profiler_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: heap-profiler_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: simple_compat_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test ./test-driver: line 112: 39897 Abort trap<span> </span>"$@" >> "$log_file" 2>&1</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test FAIL: tcmalloc_debug_unittest</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: sampler_debug_test</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f sampling_debug_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/sampling_test.sh sampling_debug_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: sampling_debug_test.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test rm -f heap-profiler_debug_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test cp -p ./src/tests/heap-profiler_unittest.sh heap-profiler_debug_unittest.sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">:info:test PASS: heap-profiler_debug_unittest.sh</span></p>
<br></div><div>So it seems to perform somewhat worse on PPC, no real surprise here, but it does not perform perfectly on Intel either, with my patch removed.</div><div>I do not see anything broken by my patch so far.</div><div><br></div><div>Since I have been in touch with upstream, I will bring the problem to their attention.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 9, 2024 at 12:31 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" target="_blank">ken.cunningham.webuse@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I think you just don't realize the wreckage you've done.<br>
<br>
Here is one of hundreds of your typical commits, although this is a simpler one than most, to be honest.<br>
<br>
The commit below has no purpose other than to allow the port to build as PPC on 10.6. And as that is really only of interest on 10.6-for-PPC, it is specifically for that. You say you want to support "Rosetta" but nobody builds for PPC on 10.6.<br>
<br>
Here, you've reordered a few instructions, and blocked out some code from running on PPC (presumably because the instructions don't exist on 10.6-for-PPC so it wouldn't compile). <br>
<br>
However, this changes the code. And it's not simple code, it is complicated code. Does this change the function of the code? Would it still work properly on 10.6 Intel? Does it work at all on 10.6 for PPC? Who can tell? I certainly don't think you have the experience to know. I can't eyeball it as being fine.<br>
<br>
It used to say:<br>
<br>
tcmalloc_zone.version = 6;<br>
tcmalloc_zone.free_definite_size = &mz_free_definite_size;<br>
tcmalloc_zone.memalign = &mz_memalign;<br>
tcmalloc_introspection.zone_locked = &mi_zone_locked;<br>
<br>
and now it says (I think) on Intel:<br>
<br>
tcmalloc_zone.version = 6;<br>
tcmalloc_zone.memalign = &mz_memalign;<br>
tcmalloc_zone.free_definite_size = &mz_free_definite_size;<br>
tcmalloc_introspection.zone_locked = &mi_zone_locked;<br>
<br>
and on 10.6-PPC you just get this:<br>
<br>
tcmalloc_zone.version = 6;<br>
tcmalloc_zone.memalign = &mz_memalign;<br>
<br>
Does reordering those statements change the function? Does it work at all with the two statements removed? It would take me considerable reading to find out. It took me 10 minutes just to figure out what your patch did.<br>
<br>
And now there it sits in the ports tree, a useless MacPorts-only patch, just waiting to break something. Some poor sot might bring an issue to upstream about this, having no idea that this is not even upstream's code any more.<br>
<br>
And there are HUNDREDS of these all throughout the codebase that need to be all stripped out.<br>
<br>
This is unfortunately a huge mess now.<br>
<br>
K<br>
<br>
<br>
<br>
<br>
<a href="https://github.com/macports/macports-ports/commit/418232ebb3d0e68579364c6246de4464f8f494c9" rel="noreferrer" target="_blank">https://github.com/macports/macports-ports/commit/418232ebb3d0e68579364c6246de4464f8f494c9</a><br>
<br>
======<br>
--- src/libc_override_osx.h.orig 2021-12-13 14:28:06.000000000 +0800<br>
+++ src/libc_override_osx.h 2023-01-19 20:14:36.000000000 +0800<br>
@@ -276,9 +276,11 @@<br>
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6<br>
// Switch to version 6 on OSX 10.6 to support memalign.<br>
tcmalloc_zone.version = 6;<br>
- tcmalloc_zone.free_definite_size = &mz_free_definite_size;<br>
tcmalloc_zone.memalign = &mz_memalign;<br>
+#ifndef __POWERPC__<br>
+ tcmalloc_zone.free_definite_size = &mz_free_definite_size;<br>
tcmalloc_introspection.zone_locked = &mi_zone_locked;<br>
+#endif<br>
<br>
// Request the default purgable zone to force its creation. The<br>
// current default zone is registered with the purgable zone for<br>
=========<br>
<br>
<br>
<br>
> On Jan 8, 2024, at 9:50 AM, Sergey Fedorov <<a href="mailto:vital.had@gmail.com" target="_blank">vital.had@gmail.com</a>> wrote:<br>
> <br>
> Here we go again.<br>
> <br>
> 1. To begin with, nobody is submitting 10A190-specific fixes to Macports. They are sitting in my local repo. Please, do not mislead people who are unaware of the matter.<br>
> <br>
> 2. Standard 10.6.8 release from Apple does support building and running ppc binaries via Rosetta. Nothing unreleased or, as you [mis]frame, “stolen”.<br>
> While I think your opposition is completely unjustified, there has been no demands or even active discussion about supporting pre-released builds on 10.6. The point is supporting officially released 10.6.8.<br>
> <br>
> 3. If anyone did wonder, the whole issue with 10A190 is literally ~20 ports altogether, and those fixes amount to a few lines of code to adjust a few assumptions re SDK. Despite it being portrayed as something like half of the Macports tree is broken and needs tailored hacks which gonna break everything. This is nowhere the case.<br>
> However, as I said above, nobody demanded 10A190 being supported in the master. Nobody commits 10A190-specific fixups.<br>
> <br>
> 4. > “The problem was that there were many fragile and sharply increasing *specific* workarounds added into the ports tree solely to support running this PowerPC beta on MacPorts”.<br>
> <br>
> This accusation keeps being repeated, but it is simply not true. You will not be able to show multiple specific workarounds for 10A190 in Macports master. They are not there.<br>
> There were a few specific fixes for standard 10.6.8 Rosetta, largely because the makefile build system misdetects the arch. They are not numerous either, and verily not sharply increasing.<br>
> <br>
> It will be great not to keep repeating false statements targeting those who are unaware of the facts.<br>
> <br>
<br>
</blockquote></div>
</blockquote></div>