You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2024/04/10 15:32:38 UTC

[PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

pitrou opened a new pull request, #41128:
URL: https://github.com/apache/arrow/pull/41128

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ### Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ### Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2047943729

   We can see the difference in the code generated for freeing mimalloc memory:
   * before, there is a direct call to `mi_free`:
   ```
   00000000012e5900 <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll>:
    12e5900:	55                   	push   %rbp
    12e5901:	48 3b 35 00 fb 47 00 	cmp    0x47fb00(%rip),%rsi        # 1765408 <_Z...@Base-0x91b8>
    12e5908:	48 89 e5             	mov    %rsp,%rbp
    12e590b:	41 54                	push   %r12
    12e590d:	49 89 d4             	mov    %rdx,%r12
    12e5910:	53                   	push   %rbx
    12e5911:	48 89 fb             	mov    %rdi,%rbx
    12e5914:	74 09                	je     12e591f <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll+0x1f>
    12e5916:	48 89 f7             	mov    %rsi,%rdi
    12e5919:	67 e8 21 af 16 00    	addr32 call 1450840 <mi_free>
    12e591f:	f0 4c 29 63 48       	lock sub %r12,0x48(%rbx)
    12e5924:	5b                   	pop    %rbx
    12e5925:	41 5c                	pop    %r12
    12e5927:	5d                   	pop    %rbp
    12e5928:	c3                   	ret    
   ```
   * after, there is an indirect call (the `call*`) through the jump table to `arrow_mi_free`:
   ```
   00000000012e5b00 <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll>:
    12e5b00:	55                   	push   %rbp
    12e5b01:	48 3b 35 c0 f8 47 00 	cmp    0x47f8c0(%rip),%rsi        # 17653c8 <_Z...@Base-0x91f8>
    12e5b08:	48 89 e5             	mov    %rsp,%rbp
    12e5b0b:	41 54                	push   %r12
    12e5b0d:	49 89 d4             	mov    %rdx,%r12
    12e5b10:	53                   	push   %rbx
    12e5b11:	48 89 fb             	mov    %rdi,%rbx
    12e5b14:	74 09                	je     12e5b1f <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll+0x1f>
    12e5b16:	48 89 f7             	mov    %rsi,%rdi
    12e5b19:	ff 15 51 6e 48 00    	call   *0x486e51(%rip)        # 176c970 <arrow_mi_free@@Base+0x47bad0>
    12e5b1f:	f0 4c 29 63 48       	lock sub %r12,0x48(%rbx)
    12e5b24:	5b                   	pop    %rbx
    12e5b25:	41 5c                	pop    %r12
    12e5b27:	5d                   	pop    %rbp
    12e5b28:	c3                   	ret    
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4614639781

   Thanks for your patience. Conbench analyzed the 3 benchmarking runs that have been run so far on PR commit 28f70691496cd406418f635f1004b370aabf0b14.
   
   There were 8 benchmark results indicating a performance regression:
   
   - Pull Request Run on `amd64-m5-4xlarge-linux` at [2026-06-03 15:02:09Z](https://conbench.arrow-dev.org/compare/runs/7c317eb89e044a72a4fb789526b769b8...c36d84aa1a5a49f19c957b308910af4b/)
     - [`TouchArea` (C++) with params=size:4096/real_time/threads:4, source=cpp-micro, suite=arrow-memory-pool-benchmark](https://conbench.arrow-dev.org/compare/benchmarks/06a1ec2bf1fc73178000ba33bd9dea0d...06a20427f40573e38000ebd70ec88d4a)
     - [`TouchArea` (C++) with params=size:4096/real_time/threads:1, source=cpp-micro, suite=arrow-memory-pool-benchmark](https://conbench.arrow-dev.org/compare/benchmarks/06a1ec2bf02676f880002c28ed22c639...06a20427f223721280008748f8243269)
   - and 6 more (see the report linked below)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/79345461536) has more details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2047958613

   Also, I do not see any significant and robust regressions in our [nano-benchmarks](https://github.com/apache/arrow/blob/6e1b62509b5e0ba69cad630519e3757688a1e0c1/cpp/src/arrow/memory_pool_benchmark.cc#L80-L98) when running them locally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4602624584

   Revision: f4148519b3deb9bad8c5ba8447c338d2899f8281
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-f5c1edacb2](https://github.com/ursacomputing/crossbow/branches/all?query=actions-f5c1edacb2)
   
   |Task|Status|
   |----|------|
   |wheel-manylinux-2-28-cp310-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp310-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821294287/job/79076317781)|
   |wheel-manylinux-2-28-cp310-cp310-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp310-cp310-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295226/job/79076320025)|
   |wheel-manylinux-2-28-cp311-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp311-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295778/job/79076322009)|
   |wheel-manylinux-2-28-cp311-cp311-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp311-cp311-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821294184/job/79076316247)|
   |wheel-manylinux-2-28-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821293639/job/79076316286)|
   |wheel-manylinux-2-28-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295657/job/79076320994)|
   |wheel-manylinux-2-28-cp313-cp313-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp313-cp313-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821294771/job/79076318953)|
   |wheel-manylinux-2-28-cp313-cp313-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp313-cp313-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821296537/job/79076325075)|
   |wheel-manylinux-2-28-cp313-cp313t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp313-cp313t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821293786/job/79076316254)|
   |wheel-manylinux-2-28-cp313-cp313t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp313-cp313t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295662/job/79076321792)|
   |wheel-manylinux-2-28-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821294644/job/79076318690)|
   |wheel-manylinux-2-28-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821293890/job/79076316378)|
   |wheel-manylinux-2-28-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295252/job/79076321349)|
   |wheel-manylinux-2-28-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-f5c1edacb2-github-wheel-manylinux-2-28-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26821295421/job/79076321718)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4708663744

   I think I addressed your review comments @zanmato1984 , do you want to take another look at this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412499225


##########
cpp/src/arrow/memory_pool_test.h:
##########
@@ -106,6 +106,14 @@ class TestMemoryPoolBase : public ::testing::Test {
       pool->Free(data512, 10, 512);
     }
   }
+
+  void TestReleaseUnused() {

Review Comment:
   It's exercising the interposition for `mi_collect`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4612890845

   Benchmark runs are scheduled for commit 28f70691496cd406418f635f1004b370aabf0b14. Watch https://buildkite.com/apache-arrow and https://conbench.arrow-dev.org for updates. A comment will be posted here when the runs are complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4602605556

   @github-actions crossbow submit wheel-manylinux-2-28*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-3547434896

   Thank you for your contribution. Unfortunately, this 
     pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label 
     or comment below, or this PR will be closed in 14 days.  Feel free to re-open this if it has been closed in error. If you
      do not have repository permissions to reopen the PR, please tag a maintainer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "zanmato1984 (via GitHub)" <gi...@apache.org>.
zanmato1984 commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3417198774


##########
cpp/src/arrow/memory_pool_benchmark.cc:
##########
@@ -17,6 +17,7 @@
 
 #include "arrow/memory_pool.h"
 #include "arrow/result.h"
+#include "arrow/util/config.h"

Review Comment:
   Shall we then statically assert the persence of `ARROW_MIMALLOC` and `ARROW_JEMALLOC`?



##########
cpp/src/arrow/memory_pool_benchmark.cc:
##########
@@ -17,6 +17,7 @@
 
 #include "arrow/memory_pool.h"
 #include "arrow/result.h"
+#include "arrow/util/config.h"

Review Comment:
   Oh... good finding!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2047871355

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - Contributing Overview](https://arrow.apache.org/docs/developers/overview.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2047926574

   @github-actions crossbow submit wheel-manylinux-2-28*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "zanmato1984 (via GitHub)" <gi...@apache.org>.
zanmato1984 commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3401023836


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
   set_source_files_properties(memory_pool_jemalloc.cc
                               PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 endif()
+if(ARROW_MIMALLOC)
+  list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+  set_source_files_properties(memory_pool_mimalloc.cc
+                              PROPERTIES SKIP_PRECOMPILE_HEADERS ON
+                                         SKIP_UNITY_BUILD_INCLUSION ON)
+endif()
+# GH-50083: make sure some allocation-related public symbols are interposable,
+# for the benefit of memory profilers and other runtime analyzers.
+# Ideally we would scope a specific subset of symbols, but it doesn't seem
+# easily doable. See `memory_pool_internal.h`.
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+   OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
+   OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  set_source_files_properties(${ARROW_MEMORY_POOL_SRCS}
+                              PROPERTIES COMPILE_OPTIONS "-fsemantic-interposition")
+endif()

Review Comment:
   Why is it not within `if(ARROW_MIMALLOC)`? Are we considering allowing other allocators to be interposed in the future?



##########
cpp/src/arrow/memory_pool_internal.h:
##########
@@ -49,8 +46,21 @@ class JemallocAllocator {
 
 #endif  // defined(ARROW_JEMALLOC)
 
-}  // namespace internal
+}  // namespace arrow::memory_pool::internal
+
+#ifdef ARROW_MIMALLOC
 
-}  // namespace memory_pool
+extern "C" {
+// GH-50083: expose public symbols with well-known names for memory profilers
+// to be able to intercept our mimalloc calls and better make sense of Arrow's
+// memory profile.
+// These symbols need to be interposable (using e.g. `LD_PRELOAD`), which is
+// ensured using a custom compilation flag in CMakeLists.txt.

Review Comment:
   Maybe we can be more explicit on the "custom compilation flag"?



##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
   set_source_files_properties(memory_pool_jemalloc.cc
                               PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 endif()
+if(ARROW_MIMALLOC)
+  list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+  set_source_files_properties(memory_pool_mimalloc.cc

Review Comment:
   I can understand skipping unity build inclusion. But why is skipping precompile headers needed? 



##########
cpp/src/arrow/memory_pool_test.h:
##########
@@ -106,6 +106,14 @@ class TestMemoryPoolBase : public ::testing::Test {
       pool->Free(data512, 10, 512);
     }
   }
+
+  void TestReleaseUnused() {

Review Comment:
   Is this test really helping on the code changed in this PR?



##########
cpp/src/arrow/memory_pool_benchmark.cc:
##########
@@ -17,6 +17,7 @@
 
 #include "arrow/memory_pool.h"
 #include "arrow/result.h"
+#include "arrow/util/config.h"

Review Comment:
   Why this change?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412483171


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
   set_source_files_properties(memory_pool_jemalloc.cc
                               PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 endif()
+if(ARROW_MIMALLOC)
+  list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+  set_source_files_properties(memory_pool_mimalloc.cc

Review Comment:
   Oh, I had forgotten we removed the logic for precompiled headers in https://github.com/apache/arrow/pull/46200 . I'll remove this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4706828878

   Revision: fe2a4e3a0cf4b3337c220ba45030e656589d7aaf
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-48f2689d41](https://github.com/ursacomputing/crossbow/branches/all?query=actions-48f2689d41)
   
   |Task|Status|
   |----|------|
   |wheel-macos-monterey-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-macos-monterey-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27539173131/job/81396204116)|
   |wheel-macos-monterey-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-macos-monterey-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/27539173855/job/81396206653)|
   |wheel-manylinux-2-28-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-manylinux-2-28-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27539173652/job/81396206102)|
   |wheel-manylinux-2-28-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-manylinux-2-28-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/27539173044/job/81396204687)|
   |wheel-musllinux-1-2-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-musllinux-1-2-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27539172396/job/81396202229)|
   |wheel-musllinux-1-2-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-musllinux-1-2-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/27539173955/job/81396205948)|
   |wheel-windows-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-48f2689d41-github-wheel-windows-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27539172642/job/81396202443)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou merged PR #41128:
URL: https://github.com/apache/arrow/pull/41128


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2047931107

   Revision: b40f11356d77680b31c14a8a2492b03f6876839f
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-468528d58b](https://github.com/ursacomputing/crossbow/branches/all?query=actions-468528d58b)
   
   |Task|Status|
   |----|------|
   |wheel-manylinux-2-28-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280516/job/23669342645)|
   |wheel-manylinux-2-28-cp310-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp310-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280610/job/23669343043)|
   |wheel-manylinux-2-28-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280551/job/23669342556)|
   |wheel-manylinux-2-28-cp311-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp311-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280467/job/23669342275)|
   |wheel-manylinux-2-28-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280563/job/23669342697)|
   |wheel-manylinux-2-28-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280818/job/23669343369)|
   |wheel-manylinux-2-28-cp38-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp38-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280509/job/23669342334)|
   |wheel-manylinux-2-28-cp38-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp38-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280698/job/23669343309)|
   |wheel-manylinux-2-28-cp39-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp39-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280458/job/23669342425)|
   |wheel-manylinux-2-28-cp39-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-468528d58b-github-wheel-manylinux-2-28-cp39-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/8634280503/job/23669342332)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412497204


##########
cpp/src/arrow/memory_pool_internal.h:
##########
@@ -49,8 +46,21 @@ class JemallocAllocator {
 
 #endif  // defined(ARROW_JEMALLOC)
 
-}  // namespace internal
+}  // namespace arrow::memory_pool::internal
+
+#ifdef ARROW_MIMALLOC
 
-}  // namespace memory_pool
+extern "C" {
+// GH-50083: expose public symbols with well-known names for memory profilers
+// to be able to intercept our mimalloc calls and better make sense of Arrow's
+// memory profile.
+// These symbols need to be interposable (using e.g. `LD_PRELOAD`), which is
+// ensured using a custom compilation flag in CMakeLists.txt.

Review Comment:
   Will do.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412491578


##########
cpp/src/arrow/memory_pool_benchmark.cc:
##########
@@ -17,6 +17,7 @@
 
 #include "arrow/memory_pool.h"
 #include "arrow/result.h"
+#include "arrow/util/config.h"

Review Comment:
   Because I noticed only the system memory pool benchmarks were enabled otherwise, as `ARROW_MIMALLOC` and `ARROW_JEMALLOC` were not defined.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4706539718

   > Also, I see the conbench showing visible performance regression, is this expected and acceptable?
   
   `TouchArea` is an allocation micro-benchmark, so I wouldn't care too much. The 5 other benchmark regressions seem a bit random and only concern a couple parameter sets, there doesn't seem to be any systemic performance regression.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4682537830

   @zanmato1984 Would you like to take a look? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "zanmato1984 (via GitHub)" <gi...@apache.org>.
zanmato1984 commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4687760016

   Yes, looking.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4602538814

   @github-actions crossbow submit wheel-manylinux-2-28*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603681917

   Ate selectively added the `-fsemantic-interposition` file for the MemoryPool implementation code and it seems it made the mimalloc symbols in the PyArrow wheels interposable again.
   
   This can be seen for example by the `arrow_mi_free` call going through the PLT (whatever that means exactly :-)):
   ```
   0000000000b89fc0 <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll.lto_priv.0>:
     b89fc0:       55                      push   %rbp
     b89fc1:       48 89 d5                mov    %rdx,%rbp
     b89fc4:       53                      push   %rbx
     b89fc5:       48 89 fb                mov    %rdi,%rbx
     b89fc8:       48 83 ec 08             sub    $0x8,%rsp
     b89fcc:       48 3b 35 9d 78 de 01    cmp    0x1de789d(%rip),%rsi        # 2971870 <_Z...@Base-0x38d0>
     b89fd3:       74 08                   je     b89fdd <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll.lto_priv.0+0x1d>
     b89fd5:       48 89 f7                mov    %rsi,%rdi
     b89fd8:       e8 23 a7 7b ff          call   344700 <ar...@plt>
     b89fdd:       f0 48 29 6b 48          lock sub %rbp,0x48(%rbx)
     b89fe2:       48 83 c4 08             add    $0x8,%rsp
     b89fe6:       5b                      pop    %rbx
     b89fe7:       5d                      pop    %rbp
     b89fe8:       c3                      ret
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412471105


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
   set_source_files_properties(memory_pool_jemalloc.cc
                               PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 endif()
+if(ARROW_MIMALLOC)
+  list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+  set_source_files_properties(memory_pool_mimalloc.cc

Review Comment:
   Hmm, I think I copy/pasted this from another place where we were selecting custom compilation flags. I'm honestly not sure whether this is necessary...
   
   (and I don't know if anyone is still using precompiled headers with Arrow C++)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603806165

   @github-actions crossbow submit *wheel*cp314*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4604634139

   @pablogsal This PR is ready. Do you want to take a look?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603170341

   Unfortunately, interposition is not possible anymore with the wheels built in the Crossbow build above. We see the `call` instruction uses a hardcoded target address:
   ```
   0000000000b89070 <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll.lto_priv.0>:
     b89070:       55                      push   %rbp
     b89071:       48 89 d5                mov    %rdx,%rbp
     b89074:       53                      push   %rbx
     b89075:       48 89 fb                mov    %rdi,%rbx
     b89078:       48 83 ec 08             sub    $0x8,%rsp
     b8907c:       48 3b 35 cd 47 de 01    cmp    0x1de47cd(%rip),%rsi        # 296d850 <_Z...@Base-0x3870>
     b89083:       74 08                   je     b8908d <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll.lto_priv.0+0x1d>
     b89085:       48 89 f7                mov    %rsi,%rdi
     b89088:       e8 d3 ff ff ff          call   b89060 <arrow_mi_free>
     b8908d:       f0 48 29 6b 48          lock sub %rbp,0x48(%rbx)
     b89092:       48 83 c4 08             add    $0x8,%rsp
     b89096:       5b                      pop    %rbx
     b89097:       5d                      pop    %rbp
     b89098:       c3                      ret
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4646771186

   Revision: 28f70691496cd406418f635f1004b370aabf0b14
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-4ad6db820e](https://github.com/ursacomputing/crossbow/branches/all?query=actions-4ad6db820e)
   
   |Task|Status|
   |----|------|
   |example-cpp-minimal-build-static|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-example-cpp-minimal-build-static)](https://github.com/ursacomputing/crossbow/actions/runs/27125294208/job/80052196294)|
   |example-cpp-minimal-build-static-system-dependency|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-example-cpp-minimal-build-static-system-dependency)](https://github.com/ursacomputing/crossbow/actions/runs/27125293968/job/80052195194)|
   |example-cpp-tutorial|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-example-cpp-tutorial)](https://github.com/ursacomputing/crossbow/actions/runs/27125294650/job/80052197572)|
   |test-build-cpp-fuzz|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-build-cpp-fuzz)](https://github.com/ursacomputing/crossbow/actions/runs/27125293913/job/80052195082)|
   |test-conda-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-conda-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27125293948/job/80052195280)|
   |test-conda-cpp-valgrind|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-conda-cpp-valgrind)](https://github.com/ursacomputing/crossbow/actions/runs/27125293004/job/80052192302)|
   |test-debian-13-cpp-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-debian-13-cpp-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27125293668/job/80052194262)|
   |test-debian-13-cpp-i386|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-debian-13-cpp-i386)](https://github.com/ursacomputing/crossbow/actions/runs/27125292689/job/80052191337)|
   |test-debian-experimental-cpp-gcc-15|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-debian-experimental-cpp-gcc-15)](https://github.com/ursacomputing/crossbow/actions/runs/27125293211/job/80052192900)|
   |test-fedora-42-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-fedora-42-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27125293980/job/80052195469)|
   |test-ubuntu-22.04-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-22.04-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27125293379/job/80052193514)|
   |test-ubuntu-22.04-cpp-bundled|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-22.04-cpp-bundled)](https://github.com/ursacomputing/crossbow/actions/runs/27125292993/job/80052192042)|
   |test-ubuntu-22.04-cpp-emscripten|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-22.04-cpp-emscripten)](https://github.com/ursacomputing/crossbow/actions/runs/27125294348/job/80052196661)|
   |test-ubuntu-22.04-cpp-no-threading|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-22.04-cpp-no-threading)](https://github.com/ursacomputing/crossbow/actions/runs/27125294559/job/80052197306)|
   |test-ubuntu-24.04-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27125293483/job/80052193767)|
   |test-ubuntu-24.04-cpp-bundled-offline|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp-bundled-offline)](https://github.com/ursacomputing/crossbow/actions/runs/27125293079/job/80052193182)|
   |test-ubuntu-24.04-cpp-gcc-13-bundled|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp-gcc-13-bundled)](https://github.com/ursacomputing/crossbow/actions/runs/27125294978/job/80052199061)|
   |test-ubuntu-24.04-cpp-gcc-14|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp-gcc-14)](https://github.com/ursacomputing/crossbow/actions/runs/27125293450/job/80052193536)|
   |test-ubuntu-24.04-cpp-minimal-with-formats|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp-minimal-with-formats)](https://github.com/ursacomputing/crossbow/actions/runs/27125292665/job/80052191211)|
   |test-ubuntu-24.04-cpp-thread-sanitizer|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-4ad6db820e-github-test-ubuntu-24.04-cpp-thread-sanitizer)](https://github.com/ursacomputing/crossbow/actions/runs/27125292960/job/80052192256)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4724138677

   After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 50f7400c3c792a6fb96816f225d8c59b4eaf2cb0.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/81778399382) has more details. It also includes information about 20 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3419219738


##########
cpp/src/arrow/memory_pool_benchmark.cc:
##########
@@ -17,6 +17,7 @@
 
 #include "arrow/memory_pool.h"
 #include "arrow/result.h"
+#include "arrow/util/config.h"

Review Comment:
   The problem is that `arrow/util/config.h.cmake` is using [`cmakedefine`](https://cmake.org/cmake/help/latest/command/configure_file.html#transformations) which lets those variables undefined if the respective allocators are not enabled.
   
   It might have been better to use `cmakedefine01` instead, but this would break compatibility.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4706802339

   @github-actions crossbow submit *wheel*cp312*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412493288


##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
   set_source_files_properties(memory_pool_jemalloc.cc
                               PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 endif()
+if(ARROW_MIMALLOC)
+  list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+  set_source_files_properties(memory_pool_mimalloc.cc
+                              PROPERTIES SKIP_PRECOMPILE_HEADERS ON
+                                         SKIP_UNITY_BUILD_INCLUSION ON)
+endif()
+# GH-50083: make sure some allocation-related public symbols are interposable,
+# for the benefit of memory profilers and other runtime analyzers.
+# Ideally we would scope a specific subset of symbols, but it doesn't seem
+# easily doable. See `memory_pool_internal.h`.
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+   OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
+   OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  set_source_files_properties(${ARROW_MEMORY_POOL_SRCS}
+                              PROPERTIES COMPILE_OPTIONS "-fsemantic-interposition")
+endif()

Review Comment:
   Good point, I'll move this within the mimalloc-conditional block.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4602569017

   Revision: ee6537dc4dce1d15b1e22a9c8dcfa65f5860aaf1
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-40c33651aa](https://github.com/ursacomputing/crossbow/branches/all?query=actions-40c33651aa)
   
   |Task|Status|
   |----|------|
   |wheel-manylinux-2-28-cp310-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp310-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820907576/job/79074943405)|
   |wheel-manylinux-2-28-cp310-cp310-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp310-cp310-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820907805/job/79074942715)|
   |wheel-manylinux-2-28-cp311-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp311-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908050/job/79074942777)|
   |wheel-manylinux-2-28-cp311-cp311-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp311-cp311-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908463/job/79074944176)|
   |wheel-manylinux-2-28-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908934/job/79074946267)|
   |wheel-manylinux-2-28-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908753/job/79074945118)|
   |wheel-manylinux-2-28-cp313-cp313-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp313-cp313-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820907803/job/79074942486)|
   |wheel-manylinux-2-28-cp313-cp313-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp313-cp313-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820909499/job/79074947860)|
   |wheel-manylinux-2-28-cp313-cp313t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp313-cp313t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908776/job/79074945268)|
   |wheel-manylinux-2-28-cp313-cp313t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp313-cp313t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820909186/job/79074946515)|
   |wheel-manylinux-2-28-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908880/job/79074945379)|
   |wheel-manylinux-2-28-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908193/job/79074943026)|
   |wheel-manylinux-2-28-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26820908478/job/79074944840)|
   |wheel-manylinux-2-28-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-40c33651aa-github-wheel-manylinux-2-28-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26820907974/job/79074942756)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603841687

   Revision: cfd2971a15df934c1aab7e8fcbe5d2491f51d2d9
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-275e51b993](https://github.com/ursacomputing/crossbow/branches/all?query=actions-275e51b993)
   
   |Task|Status|
   |----|------|
   |wheel-macos-monterey-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-macos-monterey-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829106603/job/79104978729)|
   |wheel-macos-monterey-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-macos-monterey-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829104096/job/79104967197)|
   |wheel-macos-monterey-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-macos-monterey-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829105468/job/79104974535)|
   |wheel-macos-monterey-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-macos-monterey-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829105871/job/79104976869)|
   |wheel-manylinux-2-28-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-manylinux-2-28-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829102560/job/79104965095)|
   |wheel-manylinux-2-28-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-manylinux-2-28-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829103896/job/79104968227)|
   |wheel-manylinux-2-28-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-manylinux-2-28-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829103772/job/79104968143)|
   |wheel-manylinux-2-28-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-manylinux-2-28-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829104282/job/79104970141)|
   |wheel-musllinux-1-2-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-musllinux-1-2-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829106383/job/79104977681)|
   |wheel-musllinux-1-2-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-musllinux-1-2-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829105420/job/79104973189)|
   |wheel-musllinux-1-2-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-musllinux-1-2-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829105013/job/79104972244)|
   |wheel-musllinux-1-2-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-musllinux-1-2-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26829104304/job/79104968680)|
   |wheel-windows-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-windows-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829106185/job/79104975824)|
   |wheel-windows-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-275e51b993-github-wheel-windows-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26829104393/job/79104969660)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4612889877

   @ursabot please benchmark lang=C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-2048004896

   Interestingly, the binary wheels built in the Crossbow builds above use a slightly indirection code:
   ```
   0000000001476850 <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll>:
    1476850:	55                   	push   %rbp
    1476851:	48 89 d5             	mov    %rdx,%rbp
    1476854:	53                   	push   %rbx
    1476855:	48 89 fb             	mov    %rdi,%rbx
    1476858:	48 83 ec 08          	sub    $0x8,%rsp
    147685c:	48 3b 35 05 5c 9d 01 	cmp    0x19d5c05(%rip),%rsi        # 2e4c468 <_Z...@Base-0x10898>
    1476863:	74 08                	je     147686d <_ZN5arrow18BaseMemoryPoolImplINS_12_GLOBAL__N_117MimallocAllocatorEE4FreeEPhll+0x1d>
    1476865:	48 89 f7             	mov    %rsi,%rdi
    1476868:	e8 13 56 02 ff       	call   49be80 <ar...@plt>
    147686d:	f0 48 29 6b 48       	lock sub %rbp,0x48(%rbx)
    1476872:	48 83 c4 08          	add    $0x8,%rsp
    1476876:	5b                   	pop    %rbx
    1476877:	5d                   	pop    %rbp
    1476878:	c3                   	ret    
   ```
   
   I've checked that `LD_PRELOAD` still works to interpose these functions (`arrow_mi_free` etc.).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4646753762

   @github-actions crossbow submit -g cpp


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4706671872

   Revision: fe2a4e3a0cf4b3337c220ba45030e656589d7aaf
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-34d517b649](https://github.com/ursacomputing/crossbow/branches/all?query=actions-34d517b649)
   
   |Task|Status|
   |----|------|
   |example-cpp-minimal-build-static|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-example-cpp-minimal-build-static)](https://github.com/ursacomputing/crossbow/actions/runs/27538161520/job/81392791864)|
   |example-cpp-minimal-build-static-system-dependency|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-example-cpp-minimal-build-static-system-dependency)](https://github.com/ursacomputing/crossbow/actions/runs/27538161951/job/81392793048)|
   |example-cpp-tutorial|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-example-cpp-tutorial)](https://github.com/ursacomputing/crossbow/actions/runs/27538160395/job/81392787235)|
   |test-build-cpp-fuzz|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-build-cpp-fuzz)](https://github.com/ursacomputing/crossbow/actions/runs/27538160537/job/81392787831)|
   |test-conda-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-conda-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27538160218/job/81392787122)|
   |test-conda-cpp-valgrind|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-conda-cpp-valgrind)](https://github.com/ursacomputing/crossbow/actions/runs/27538161190/job/81392791095)|
   |test-debian-13-cpp-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-debian-13-cpp-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/27538161321/job/81392791103)|
   |test-debian-13-cpp-i386|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-debian-13-cpp-i386)](https://github.com/ursacomputing/crossbow/actions/runs/27538162137/job/81392793740)|
   |test-debian-experimental-cpp-gcc-15|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-debian-experimental-cpp-gcc-15)](https://github.com/ursacomputing/crossbow/actions/runs/27538161558/job/81392791491)|
   |test-fedora-42-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-fedora-42-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27538161430/job/81392791027)|
   |test-ubuntu-22.04-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-22.04-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27538161412/job/81392790910)|
   |test-ubuntu-22.04-cpp-bundled|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-22.04-cpp-bundled)](https://github.com/ursacomputing/crossbow/actions/runs/27538161869/job/81392793147)|
   |test-ubuntu-22.04-cpp-emscripten|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-22.04-cpp-emscripten)](https://github.com/ursacomputing/crossbow/actions/runs/27538162040/job/81392793139)|
   |test-ubuntu-22.04-cpp-no-threading|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-22.04-cpp-no-threading)](https://github.com/ursacomputing/crossbow/actions/runs/27538160287/job/81392787059)|
   |test-ubuntu-24.04-cpp|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp)](https://github.com/ursacomputing/crossbow/actions/runs/27538161123/job/81392790333)|
   |test-ubuntu-24.04-cpp-bundled-offline|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp-bundled-offline)](https://github.com/ursacomputing/crossbow/actions/runs/27538161999/job/81392793160)|
   |test-ubuntu-24.04-cpp-gcc-13-bundled|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp-gcc-13-bundled)](https://github.com/ursacomputing/crossbow/actions/runs/27538161003/job/81392789476)|
   |test-ubuntu-24.04-cpp-gcc-14|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp-gcc-14)](https://github.com/ursacomputing/crossbow/actions/runs/27538160769/job/81392788237)|
   |test-ubuntu-24.04-cpp-minimal-with-formats|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp-minimal-with-formats)](https://github.com/ursacomputing/crossbow/actions/runs/27538160345/job/81392787196)|
   |test-ubuntu-24.04-cpp-thread-sanitizer|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-34d517b649-github-test-ubuntu-24.04-cpp-thread-sanitizer)](https://github.com/ursacomputing/crossbow/actions/runs/27538160475/job/81392787516)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-50083: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4706641188

   @github-actions crossbow submit -g cpp


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603385331

   Revision: cfd2971a15df934c1aab7e8fcbe5d2491f51d2d9
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-b477fba900](https://github.com/ursacomputing/crossbow/branches/all?query=actions-b477fba900)
   
   |Task|Status|
   |----|------|
   |wheel-manylinux-2-28-cp310-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp310-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826184245/job/79094202863)|
   |wheel-manylinux-2-28-cp310-cp310-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp310-cp310-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826185604/job/79094208309)|
   |wheel-manylinux-2-28-cp311-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp311-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826185885/job/79094209630)|
   |wheel-manylinux-2-28-cp311-cp311-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp311-cp311-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826186406/job/79094211089)|
   |wheel-manylinux-2-28-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826185822/job/79094209035)|
   |wheel-manylinux-2-28-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826183305/job/79094199055)|
   |wheel-manylinux-2-28-cp313-cp313-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp313-cp313-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826184043/job/79094203588)|
   |wheel-manylinux-2-28-cp313-cp313-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp313-cp313-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826182827/job/79094196654)|
   |wheel-manylinux-2-28-cp313-cp313t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp313-cp313t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826183958/job/79094200678)|
   |wheel-manylinux-2-28-cp313-cp313t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp313-cp313t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826184952/job/79094205714)|
   |wheel-manylinux-2-28-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826185460/job/79094207572)|
   |wheel-manylinux-2-28-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826182350/job/79094197616)|
   |wheel-manylinux-2-28-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/26826183809/job/79094202280)|
   |wheel-manylinux-2-28-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-b477fba900-github-wheel-manylinux-2-28-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/26826184720/job/79094202693)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] EXPERIMENT: [C++] Access mimalloc through dynamically-resolved symbols [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #41128:
URL: https://github.com/apache/arrow/pull/41128#issuecomment-4603351160

   @github-actions crossbow submit wheel-manylinux-2-28*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org