Merge of xmrig v6.5.0
This commit is contained in:
commit
a57d1bbbda
86 changed files with 15293 additions and 490 deletions
|
@ -138,10 +138,7 @@ private:
|
|||
class CpuBackendPrivate
|
||||
{
|
||||
public:
|
||||
inline CpuBackendPrivate(Controller *controller) :
|
||||
controller(controller)
|
||||
{
|
||||
}
|
||||
inline CpuBackendPrivate(Controller *controller) : controller(controller) {}
|
||||
|
||||
|
||||
inline void start()
|
||||
|
@ -155,7 +152,12 @@ public:
|
|||
);
|
||||
|
||||
status.start(threads, algo.l3());
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
workers.start(threads, benchmark);
|
||||
# else
|
||||
workers.start(threads);
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,6 +206,10 @@ public:
|
|||
std::vector<CpuLaunchData> threads;
|
||||
String profileName;
|
||||
Workers<CpuLaunchData> workers;
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
std::shared_ptr<Benchmark> benchmark;
|
||||
# endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -338,9 +344,15 @@ void xmrig::CpuBackend::setJob(const Job &job)
|
|||
return stop();
|
||||
}
|
||||
|
||||
const CpuConfig &cpu = d_ptr->controller->config()->cpu();
|
||||
const auto &cpu = d_ptr->controller->config()->cpu();
|
||||
|
||||
std::vector<CpuLaunchData> threads = cpu.get(d_ptr->controller->miner(), job.algorithm(), d_ptr->controller->config()->pools().benchSize());
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
uint32_t benchSize = job.benchSize();
|
||||
# else
|
||||
constexpr uint32_t benchSize = 0;
|
||||
# endif
|
||||
|
||||
auto threads = cpu.get(d_ptr->controller->miner(), job.algorithm(), benchSize);
|
||||
if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin())) {
|
||||
return;
|
||||
}
|
||||
|
@ -356,6 +368,12 @@ void xmrig::CpuBackend::setJob(const Job &job)
|
|||
|
||||
stop();
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
if (benchSize) {
|
||||
d_ptr->benchmark = std::make_shared<Benchmark>(job, threads.size(), this);
|
||||
}
|
||||
# endif
|
||||
|
||||
d_ptr->threads = std::move(threads);
|
||||
d_ptr->start();
|
||||
}
|
||||
|
@ -412,6 +430,7 @@ rapidjson::Value xmrig::CpuBackend::toJSON(rapidjson::Document &doc) const
|
|||
out.AddMember("profile", profileName().toJSON(), allocator);
|
||||
out.AddMember("hw-aes", cpu.isHwAES(), allocator);
|
||||
out.AddMember("priority", cpu.priority(), allocator);
|
||||
out.AddMember("msr", Rx::isMSR(), allocator);
|
||||
|
||||
# ifdef XMRIG_FEATURE_ASM
|
||||
const Assembly assembly = Cpu::assembly(cpu.assembly());
|
||||
|
@ -469,15 +488,14 @@ void xmrig::CpuBackend::handleRequest(IApiRequest &request)
|
|||
#ifdef XMRIG_FEATURE_BENCHMARK
|
||||
xmrig::Benchmark *xmrig::CpuBackend::benchmark() const
|
||||
{
|
||||
return d_ptr->workers.benchmark();
|
||||
return d_ptr->benchmark.get();
|
||||
}
|
||||
|
||||
|
||||
void xmrig::CpuBackend::printBenchProgress() const
|
||||
{
|
||||
auto benchmark = d_ptr->workers.benchmark();
|
||||
if (benchmark) {
|
||||
benchmark->printProgress();
|
||||
if (d_ptr->benchmark) {
|
||||
d_ptr->benchmark->printProgress();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <support@xmrig.com>
|
||||
* Copyright (c) 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2020 XMRig <support@xmrig.com>
|
||||
*
|
||||
* 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
|
||||
|
@ -346,6 +341,12 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const
|
|||
out.AddMember("assembly", "none", allocator);
|
||||
# endif
|
||||
|
||||
# if defined(__x86_64__) || defined(_M_AMD64)
|
||||
out.AddMember("arch", "x86_64", allocator);
|
||||
# else
|
||||
out.AddMember("arch", "x86", allocator);
|
||||
# endif
|
||||
|
||||
Value flags(kArrayType);
|
||||
|
||||
for (size_t i = 0; i < flagNames.size(); ++i) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <support@xmrig.com>
|
||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2020 XMRig <support@xmrig.com>
|
||||
*
|
||||
* 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
|
||||
|
@ -103,6 +103,12 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const
|
|||
out.AddMember("msr", "none", allocator);
|
||||
out.AddMember("assembly", "none", allocator);
|
||||
|
||||
# ifdef XMRIG_ARMv8
|
||||
out.AddMember("arch", "aarch64", allocator);
|
||||
# else
|
||||
out.AddMember("arch", "aarch32", allocator);
|
||||
# endif
|
||||
|
||||
Value flags(kArrayType);
|
||||
|
||||
if (hasAES()) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* XMRig
|
||||
* Copyright 2018 Riku Voipio <riku.voipio@iki.fi>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <support@xmrig.com>
|
||||
* Copyright (c) 2018 Riku Voipio <riku.voipio@iki.fi>
|
||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2020 XMRig <support@xmrig.com>
|
||||
*
|
||||
* 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
|
||||
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
#include "base/tools/String.h"
|
||||
#include "3rdparty/fmt/core.h"
|
||||
|
||||
|
||||
#include <cstdio>
|
||||
|
@ -289,7 +290,8 @@ static bool arm_cpu_decode(lscpu_desc *desc)
|
|||
|
||||
for (size_t i = 0; impl.parts[i].id != -1; ++i) {
|
||||
if (impl.parts[i].id == model) {
|
||||
desc->model = impl.parts[i].name;
|
||||
desc->vendor = impl.name;
|
||||
desc->model = impl.parts[i].name;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -304,7 +306,7 @@ String cpu_name_arm()
|
|||
{
|
||||
lscpu_desc desc;
|
||||
if (read_basicinfo(&desc) && arm_cpu_decode(&desc)) {
|
||||
return desc.model;
|
||||
return fmt::format("{} {}", desc.vendor, desc.model).c_str();
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue