Skip to content

cmake: re-enable TCMalloc and allocator related cleanups - #46103

Merged
tchaikov merged 3 commits into
ceph:masterfrom
tchaikov:cmake-alloc-cleanup
May 4, 2022
Merged

tchaikov merged 3 commits into
ceph:masterfrom
tchaikov:cmake-alloc-cleanup

Conversation

@tchaikov

@tchaikov tchaikov commented May 2, 2022 •

Copy link
Copy Markdown
Contributor

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

before this change, the ALLOCATOR cmake option are handled at two
difference places: one to handle ALLOCATOR option, another to add
compilation options based on ALLOCATOR. after this change:

* the ALLOCATOR option is handled in a single place
* dedup the branches handling different ALLOCATORS into a single
  condition: (NOT ALLOCATOR STREQUAL "libc")
* add_compile_options() calls are consolidated into a single one

Signed-off-by: Kefu Chai <[email protected]>
before this change, we assume that "ALLOCATOR" is the library name
which can be found by linker with "ld -l <namespec>". but ideally,
cmake can find a library in a more sophiscated way used by
its "find_library()" implementation. so, in this change, instead of
relying on the default paths looked up by "ld", use the path
found by cmake.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the cmake-alloc-cleanup branch from d8056e6 to 5e3d922 Compare May 2, 2022 04:41
@tchaikov tchaikov mentioned this pull request May 2, 2022
3 of 14 tasks
@tchaikov

tchaikov commented May 2, 2022

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@tchaikov
tchaikov requested review from markhpc and rzarzynski May 3, 2022 06:30
@tchaikov
tchaikov force-pushed the cmake-alloc-cleanup branch from 7fa60e7 to eeb4e31 Compare May 3, 2022 07:22
@tchaikov tchaikov changed the title cmake: allocator related cleanups cmake: re-enable TCMalloc and allocator related cleanups May 3, 2022
@tchaikov
tchaikov force-pushed the cmake-alloc-cleanup branch from eeb4e31 to 1e3d2b5 Compare May 3, 2022 13:51
@tchaikov
tchaikov requested a review from athanatos May 4, 2022 00:35

@athanatos athanatos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.

@tchaikov

tchaikov commented May 4, 2022

Copy link
Copy Markdown
Contributor Author

@tchaikov
tchaikov merged commit a2cc038 into ceph:master May 4, 2022
@tchaikov
tchaikov deleted the cmake-alloc-cleanup branch May 4, 2022 11:29
Comment thread src/CMakeLists.txt
target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common
Boost::thread)
Boost::thread
${ALLOC_LIBS})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is even more than we had in the past but actually unifying the allocator is a desired thing IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants