Files
scylladb/pgo/CMakeLists.txt
Avi Kivity 5e1cf90a51 build: replace tools/java submodule with packaged cassandra-stress
We no longer use tools/java (scylladb/scylla-tools-java.git) for
nodetool or cqlsh; only cassandra-stress. Since that is available
in package form install that and excise the tools/java submodule
from the source tree.

pgo/ is adjusted to use the packaged cassandra-stress (and the cqlsh
submodule).

A few jmx references are dropped as well.

Frozen toolchain regenerated.

Optimized clang from

  https://devpkg.scylladb.com/clang/clang-19.1.7-Fedora-41-aarch64.tar.gz
  https://devpkg.scylladb.com/clang/clang-19.1.7-Fedora-41-x86_64.tar.gz

Closes scylladb/scylladb#23698
2025-04-15 10:11:28 +03:00

33 lines
1.0 KiB
CMake

# ts is used by pgo/pgo.py
find_program(TIMESTAMP ts
REQUIRED)
set(profdata_dir "${Scylla_PROFILE_DATA_DIR}/profiles")
set(sampled_profdata "${profdata_dir}/prof.profdata")
# Profile collection depends on java tools because we use cassandra-stress as the load.
add_custom_command(
OUTPUT "${sampled_profdata}"
DEPENDS
scylla
COMMAND ${CMAKE_COMMAND} -E rm -r "${profdata_dir}"
COMMAND ${CMAKE_SOURCE_DIR}/pgo/train "$<TARGET_FILE:scylla>"
${sampled_profdata}
${CMAKE_BINARY_DIR}/pgo_datasets)
add_custom_target(sampled_profdata
DEPENDS "${sampled_profdata}")
set(all_profdata_files ${sampled_profdata})
if(profdata_file)
list(APPEND all_profdata_files "${profdata_file}")
endif()
set(merged_profdata "${profdata_dir}/merged.profdata")
find_program(LLVM_PROFDATA llvm-profdata
REQUIRED)
add_custom_command(
OUTPUT "${merged_profdata}"
DEPENDS "${all_profdata_files}"
COMMAND ${LLVM_PROFDATA} merge ${all_profdata_files} -output "${merged_profdata}")
add_custom_target(merged_profdata
DEPENDS "${merged_profdata}")