mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-24 08:08:58 +00:00
Merge branch '64bit-is-not-x64' of https://github.com/rivoreo/xmrig into dev
This commit is contained in:
commit
5a846ebd58
4 changed files with 15 additions and 20 deletions
|
@ -5,8 +5,8 @@
|
||||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||||
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright 2016-2019 XMRig <support@xmrig.com>
|
* Copyright 2016-2020 XMRig <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -88,34 +88,27 @@ static void print_cpu(Config *)
|
||||||
{
|
{
|
||||||
const auto info = Cpu::info();
|
const auto info = Cpu::info();
|
||||||
|
|
||||||
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s%s (%zu)") " %sx64 %sAES%s",
|
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s%s (%zu)") " %s %sAES%s",
|
||||||
"CPU",
|
"CPU",
|
||||||
info->brand(),
|
info->brand(),
|
||||||
info->packages(),
|
info->packages(),
|
||||||
info->isX64() ? GREEN_BOLD_S : RED_BOLD_S "-",
|
ICpuInfo::is64bit() ? GREEN_BOLD("64-bit") : RED_BOLD("32-bit"),
|
||||||
info->hasAES() ? GREEN_BOLD_S : RED_BOLD_S "-",
|
info->hasAES() ? GREEN_BOLD_S : RED_BOLD_S "-",
|
||||||
info->isVM() ? RED_BOLD_S " VM" : ""
|
info->isVM() ? RED_BOLD_S " VM" : ""
|
||||||
);
|
);
|
||||||
# if defined(XMRIG_FEATURE_HWLOC)
|
# if defined(XMRIG_FEATURE_HWLOC)
|
||||||
Log::print(WHITE_BOLD(" %-13s") BLACK_BOLD("L2:") WHITE_BOLD("%.1f MB") BLACK_BOLD(" L3:") WHITE_BOLD("%.1f MB")
|
Log::print(WHITE_BOLD(" %-13s") BLACK_BOLD("L2:") WHITE_BOLD("%.1f MB") BLACK_BOLD(" L3:") WHITE_BOLD("%.1f MB")
|
||||||
CYAN_BOLD(" %zu") "C" BLACK_BOLD("/") CYAN_BOLD("%zu") "T"
|
CYAN_BOLD(" %zu") "C" BLACK_BOLD("/") CYAN_BOLD("%zu") "T"
|
||||||
# ifdef XMRIG_FEATURE_HWLOC
|
BLACK_BOLD(" NUMA:") CYAN_BOLD("%zu"),
|
||||||
BLACK_BOLD(" NUMA:") CYAN_BOLD("%zu")
|
"",
|
||||||
# endif
|
|
||||||
, "",
|
|
||||||
info->L2() / 1048576.0,
|
info->L2() / 1048576.0,
|
||||||
info->L3() / 1048576.0,
|
info->L3() / 1048576.0,
|
||||||
info->cores(),
|
info->cores(),
|
||||||
info->threads()
|
info->threads(),
|
||||||
# ifdef XMRIG_FEATURE_HWLOC
|
info->nodes()
|
||||||
, info->nodes()
|
|
||||||
# endif
|
|
||||||
);
|
);
|
||||||
# else
|
# else
|
||||||
Log::print(WHITE_BOLD(" %-13s") BLACK_BOLD("threads:") CYAN_BOLD("%zu"),
|
Log::print(WHITE_BOLD(" %-13s") BLACK_BOLD("threads:") CYAN_BOLD("%zu"), "", info->threads());
|
||||||
"",
|
|
||||||
info->threads()
|
|
||||||
);
|
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,9 @@ public:
|
||||||
virtual ~ICpuInfo() = default;
|
virtual ~ICpuInfo() = default;
|
||||||
|
|
||||||
# if defined(__x86_64__) || defined(_M_AMD64) || defined (__arm64__) || defined (__aarch64__)
|
# if defined(__x86_64__) || defined(_M_AMD64) || defined (__arm64__) || defined (__aarch64__)
|
||||||
inline constexpr static bool isX64() { return true; }
|
inline constexpr static bool is64bit() { return true; }
|
||||||
# else
|
# else
|
||||||
inline constexpr static bool isX64() { return false; }
|
inline constexpr static bool is64bit() { return false; }
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
virtual Assembly::Id assembly() const = 0;
|
virtual Assembly::Id assembly() const = 0;
|
||||||
|
|
|
@ -346,7 +346,8 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const
|
||||||
out.AddMember("proc_info", m_procInfo, allocator);
|
out.AddMember("proc_info", m_procInfo, allocator);
|
||||||
out.AddMember("aes", hasAES(), allocator);
|
out.AddMember("aes", hasAES(), allocator);
|
||||||
out.AddMember("avx2", hasAVX2(), allocator);
|
out.AddMember("avx2", hasAVX2(), allocator);
|
||||||
out.AddMember("x64", isX64(), allocator);
|
out.AddMember("x64", is64bit(), allocator); // DEPRECATED will be removed in the next major release.
|
||||||
|
out.AddMember("64_bit", is64bit(), allocator);
|
||||||
out.AddMember("l2", static_cast<uint64_t>(L2()), allocator);
|
out.AddMember("l2", static_cast<uint64_t>(L2()), allocator);
|
||||||
out.AddMember("l3", static_cast<uint64_t>(L3()), allocator);
|
out.AddMember("l3", static_cast<uint64_t>(L3()), allocator);
|
||||||
out.AddMember("cores", static_cast<uint64_t>(cores()), allocator);
|
out.AddMember("cores", static_cast<uint64_t>(cores()), allocator);
|
||||||
|
|
|
@ -100,7 +100,8 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const
|
||||||
out.AddMember("brand", StringRef(brand()), allocator);
|
out.AddMember("brand", StringRef(brand()), allocator);
|
||||||
out.AddMember("aes", hasAES(), allocator);
|
out.AddMember("aes", hasAES(), allocator);
|
||||||
out.AddMember("avx2", false, allocator);
|
out.AddMember("avx2", false, allocator);
|
||||||
out.AddMember("x64", isX64(), allocator);
|
out.AddMember("x64", is64bit(), allocator); // DEPRECATED will be removed in the next major release.
|
||||||
|
out.AddMember("64_bit", is64bit(), allocator);
|
||||||
out.AddMember("l2", static_cast<uint64_t>(L2()), allocator);
|
out.AddMember("l2", static_cast<uint64_t>(L2()), allocator);
|
||||||
out.AddMember("l3", static_cast<uint64_t>(L3()), allocator);
|
out.AddMember("l3", static_cast<uint64_t>(L3()), allocator);
|
||||||
out.AddMember("cores", static_cast<uint64_t>(cores()), allocator);
|
out.AddMember("cores", static_cast<uint64_t>(cores()), allocator);
|
||||||
|
|
Loading…
Reference in a new issue