Skip to content

Commit

Permalink
2.9.0 preparation (#336)
Browse files Browse the repository at this point in the history
* Fixed Dashboard sum column
* Fixed 1GB HugePages
* Rebased latest RX and CN improvements from XMRig 6.8.2
* Added columns `total memory`, `free memory` and `isVM` to the dashboard and the info tooltip when hovering the `Host` column #323
  • Loading branch information
Bendr0id committed Feb 22, 2021
1 parent 33fbeb5 commit 7762a9e
Show file tree
Hide file tree
Showing 422 changed files with 34,587 additions and 16,913 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 2.9.0
* Fixed Dashboard sum column
* Fixed 1GB HugePages
* Rebased latest RX and CN improvements from XMRig 6.8.2
* Added columns `total memory`, `free memory` and `isVM` to the dashboard and the info tooltip when hovering the `Host` column #323
# 2.8.5
* Added parameter --max-cpu-usage (config: `"max-cpu-usage": 100`) to **throttle cpu usage without reducing the cores/threads**
* Added parameter --cpu-max-cpu-usage (config: `"max-cpu-usage": 100`) to **throttle cpu usage without reducing the cores/threads**
* See documentation for details [MAX-CPU-USAGE](https://github.com/Bendr0id/xmrigCC/blob/master/doc/CPU_MAX_USAGE.md)
* Added columns `cpu-max-usage` and `cpu-nodes` to the dashboard and the info tooltip when hovering the `Host` column
* Fixed potential crash in XMRigCCServer on cleanup statistics
Expand Down
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

option(WITH_LIBCPUID "Enable libcpuid support" ON)
option(WITH_HWLOC "Enable hwloc support" ON)
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" OFF)
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
option(WITH_CN_EXTREMELITE "CryptoNight-Extremelite support" ON)
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
option(WITH_PROFILING "Enable developer profiling" OFF)
option(WITH_TLS "Enable OpenSSL support" ON)
option(WITH_ZLIB "Enabled gzip compression on CC (client/server)" OFF)
option(WITH_ASM "Enable ASM PoW implementations" ON)
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
option(WITH_MSR "Enable MSR support" ON)
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
option(WITH_CC_CLIENT "CC Client" ON)
option(WITH_CC_SERVER "CC Server" ON)
option(WITH_HTTPLIB_POLL "Use poll.h (recommended) instead of old plain sockets for HTTP" ON)
Expand All @@ -34,7 +35,6 @@ option(BUILD_STATIC "Build static binary" OFF)
option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)
option(HWLOC_DEBUG "Enable hwloc debug helpers and log" OFF)


set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

if(NOT MINER_EXECUTABLE_NAME)
Expand Down Expand Up @@ -91,6 +91,7 @@ set(HEADERS_CRYPTO
src/base/crypto/Algorithm.h
src/base/crypto/Coin.h
src/base/crypto/keccak.h
src/base/crypto/sha3.h
src/crypto/common/HugePagesInfo.h
src/crypto/common/MemoryPool.h
src/crypto/common/Nonce.h
Expand Down Expand Up @@ -130,6 +131,7 @@ set(SOURCES_CRYPTO
src/base/crypto/Algorithm.cpp
src/base/crypto/Coin.cpp
src/base/crypto/keccak.cpp
src/base/crypto/sha3.cpp
src/crypto/common/HugePagesInfo.cpp
src/crypto/common/MemoryPool.cpp
src/crypto/common/Nonce.cpp
Expand Down Expand Up @@ -189,9 +191,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
endif()

add_definitions(/D__STDC_FORMAT_MACROS)
add_definitions(/DUNICODE)
add_definitions(/DMINER_EXECUTABLE_NAME=${MINER_EXECUTABLE_NAME})
add_definitions(-DMINER_EXECUTABLE_NAME=${MINER_EXECUTABLE_NAME})
add_definitions(-DXMRIG_MINER_PROJECT -DXMRIG_JSON_SINGLE_LINE_ARRAY)
add_definitions(-D__STDC_FORMAT_MACROS -DUNICODE -D_FILE_OFFSET_BITS=64)


find_package(UV REQUIRED)

Expand All @@ -201,7 +204,6 @@ include(cmake/argon2.cmake)
include(cmake/astrobwt.cmake)
include(cmake/OpenSSL.cmake)
include(cmake/asm.cmake)
include(cmake/cn-gpu.cmake)

if (WITH_CN_LITE)
add_definitions(/DXMRIG_ALGO_CN_LITE)
Expand Down Expand Up @@ -314,7 +316,7 @@ if (WITH_DEBUG_LOG)
add_definitions(/DAPP_DEBUG)
endif()

add_executable(xmrigMiner ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES} ${CN_GPU_SOURCES} ${SOURCES_CC_CLIENT} ${SOURCES_CC_COMMON})
add_executable(xmrigMiner ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES} ${SOURCES_CC_CLIENT} ${SOURCES_CC_COMMON})
target_link_libraries(xmrigMiner ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY} ${ZLIB_LIBRARIES})
set_target_properties(xmrigMiner PROPERTIES OUTPUT_NAME ${MINER_EXECUTABLE_NAME})

Expand Down
2 changes: 0 additions & 2 deletions cmake/astrobwt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ if (WITH_ASTROBWT)

list(APPEND HEADERS_CRYPTO
src/crypto/astrobwt/AstroBWT.h
src/crypto/astrobwt/sha3.h
)

list(APPEND SOURCES_CRYPTO
src/crypto/astrobwt/AstroBWT.cpp
src/crypto/astrobwt/sha3.cpp
)

if (XMRIG_ARM)
Expand Down
25 changes: 0 additions & 25 deletions cmake/cn-gpu.cmake

This file was deleted.

10 changes: 7 additions & 3 deletions cmake/cpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ if (NOT CMAKE_SYSTEM_PROCESSOR)
message(WARNING "CMAKE_SYSTEM_PROCESSOR not defined")
endif()


if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(/DRAPIDJSON_SSE2)
else()
set(WITH_SSE4_1 OFF)
endif()

if (NOT ARM_TARGET)
Expand All @@ -17,7 +18,6 @@ endif()

if (ARM_TARGET AND ARM_TARGET GREATER 6)
set(XMRIG_ARM ON)
set(WITH_LIBCPUID OFF)
add_definitions(/DXMRIG_ARM)

message(STATUS "Use ARM_TARGET=${ARM_TARGET} (${CMAKE_SYSTEM_PROCESSOR})")
Expand All @@ -41,3 +41,7 @@ if (ARM_TARGET AND ARM_TARGET GREATER 6)
add_definitions(/DXMRIG_ARMv7)
endif()
endif()

if (WITH_SSE4_1)
add_definitions(/DXMRIG_FEATURE_SSE4_1)
endif()
4 changes: 4 additions & 0 deletions cmake/os.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ elseif(XMRIG_OS_UNIX)
add_definitions(/DXMRIG_OS_FREEBSD)
endif()
endif()

if (WITH_SECURE_JIT)
add_definitions(/DXMRIG_SECURE_JIT)
endif()
52 changes: 45 additions & 7 deletions cmake/randomx.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
if (WITH_RANDOMX)
add_definitions(/DXMRIG_ALGO_RANDOMX)
set(WITH_ARGON2 ON)

list(APPEND HEADERS_CRYPTO
src/crypto/rx/Rx.h
Expand All @@ -16,8 +17,6 @@ if (WITH_RANDOMX)
list(APPEND SOURCES_CRYPTO
src/crypto/randomx/aes_hash.cpp
src/crypto/randomx/allocator.cpp
src/crypto/randomx/argon2_core.c
src/crypto/randomx/argon2_ref.c
src/crypto/randomx/blake2_generator.cpp
src/crypto/randomx/blake2/blake2b.c
src/crypto/randomx/bytecode_machine.cpp
Expand Down Expand Up @@ -67,7 +66,23 @@ if (WITH_RANDOMX)
src/crypto/randomx/jit_compiler_a64.cpp
)
# cheat because cmake and ccache hate each other
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C)
if (CMAKE_GENERATOR STREQUAL Xcode)
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE ASM)
else()
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C)
endif()
else()
list(APPEND SOURCES_CRYPTO
src/crypto/randomx/jit_compiler_fallback.cpp
)
endif()

if (WITH_SSE4_1)
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/blake2b_sse41.c)

if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
set_source_files_properties(src/crypto/randomx/blake2/blake2b_sse41.c PROPERTIES COMPILE_FLAGS -msse4.1)
endif()
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
Expand All @@ -90,18 +105,41 @@ if (WITH_RANDOMX)
message("-- WITH_MSR=ON")

if (XMRIG_OS_WIN)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_win.cpp)
list(APPEND SOURCES_CRYPTO
src/crypto/rx/RxFix_win.cpp
src/hw/msr/Msr_win.cpp
)
elseif (XMRIG_OS_LINUX)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_linux.cpp)
list(APPEND SOURCES_CRYPTO
src/crypto/rx/RxFix_linux.cpp
src/hw/msr/Msr_linux.cpp
)
endif()

list(APPEND HEADERS_CRYPTO src/crypto/rx/msr/MsrItem.h)
list(APPEND SOURCES_CRYPTO src/crypto/rx/msr/MsrItem.cpp)
list(APPEND HEADERS_CRYPTO
src/crypto/rx/RxFix.h
src/crypto/rx/RxMsr.h
src/hw/msr/Msr.h
src/hw/msr/MsrItem.h
)

list(APPEND SOURCES_CRYPTO
src/crypto/rx/RxMsr.cpp
src/hw/msr/Msr.cpp
src/hw/msr/MsrItem.cpp
)
else()
remove_definitions(/DXMRIG_FEATURE_MSR)
remove_definitions(/DXMRIG_FIX_RYZEN)
message("-- WITH_MSR=OFF")
endif()

if (WITH_PROFILING)
add_definitions(/DXMRIG_FEATURE_PROFILING)

list(APPEND HEADERS_CRYPTO src/crypto/rx/Profiler.h)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Profiler.cpp)
endif()
else()
remove_definitions(/DXMRIG_ALGO_RANDOMX)
endif()
2 changes: 1 addition & 1 deletion doc/CPU.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Each line represent one thread, first element is intensity, this option was know
```json
[-1, -1, -1, -1]
```
Each number represent one thread and means CPU affinity, this is default format for algorithm with maximum intensity 1, currently it all RandomX variants and cryptonight-gpu.
Each number represent one thread and means CPU affinity, this is default format for algorithm with maximum intensity 1, currently it all RandomX variants.

#### Short object format
```json
Expand Down
2 changes: 1 addition & 1 deletion doc/CPU_MAX_USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The old option `max-threads-hint` is still in place and can be combined with thi
```

#### Command line
`--max-cpu-usage 100`
`--cpu-max-cpu-usage 100`


# Maximum CPU usage (before XMRigCC 2.8.5)
Expand Down
2 changes: 0 additions & 2 deletions doc/build/CMAKE_OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This document contains list of useful cmake options.
* **`-DWITH_CN_LITE=OFF`** disable all CryptoNight-Lite algorithms (`cn-lite/0`, `cn-lite/1`).
* **`-DWITH_CN_HEAVY=OFF`** disable all CryptoNight-Heavy algorithms (`cn-heavy/0`, `cn-heavy/xhv`, `cn-heavy/tube`).
* **`-DWITH_CN_PICO=OFF`** disable CryptoNight-Pico algorithm (`cn-pico`).
* **`-DWITH_CN_GPU=OFF`** disable CryptoNight-GPU algorithm (`cn/gpu`).
* **`-DWITH_RANDOMX=OFF`** disable RandomX algorithms (`rx/*`).
* **`-DWITH_ARGON2=OFF`** disable Argon2 algorithms (`argon2/chukwa`, `argon2/wrkz`).

Expand All @@ -16,7 +15,6 @@ This document contains list of useful cmake options.
disable [hwloc](https://github.com/xmrig/xmrig/issues/1077) support.
Disabling this feature is not recommended in most cases.
This feature add external dependency to libhwloc (1.10.0+) (except MSVC builds).
* **`-DWITH_LIBCPUID=OFF`** disable built in libcpuid support, this feature always disabled if hwloc enabled, if both hwloc and libcpuid disabled auto configuration for CPU will very limited.
* **`-DWITH_HTTP=OFF`** disable built in HTTP support, this feature used for HTTP API and daemon (solo mining) support.
* **`-DWITH_TLS=OFF`** disable SSL/TLS support (secure connections to pool). This feature add external dependency to OpenSSL.
* **`-DWITH_ASM=OFF`** disable assembly optimizations for modern CryptoNight algorithms.
Expand Down
Loading

0 comments on commit 7762a9e

Please sign in to comment.