Improved thread self test error message.
This commit is contained in:
parent
d8b07570a3
commit
2a107cc463
6 changed files with 30 additions and 8 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include "backend/common/Workers.h"
|
#include "backend/common/Workers.h"
|
||||||
#include "backend/cpu/CpuWorker.h"
|
#include "backend/cpu/CpuWorker.h"
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/tools/Object.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_OPENCL
|
#ifdef XMRIG_FEATURE_OPENCL
|
||||||
|
@ -42,9 +43,10 @@ namespace xmrig {
|
||||||
class WorkersPrivate
|
class WorkersPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline WorkersPrivate()
|
XMRIG_DISABLE_COPY_MOVE(WorkersPrivate)
|
||||||
{
|
|
||||||
}
|
|
||||||
|
WorkersPrivate() = default;
|
||||||
|
|
||||||
|
|
||||||
inline ~WorkersPrivate()
|
inline ~WorkersPrivate()
|
||||||
|
@ -155,7 +157,7 @@ void xmrig::Workers<T>::onReady(void *arg)
|
||||||
|
|
||||||
IWorker *worker = create(handle);
|
IWorker *worker = create(handle);
|
||||||
if (!worker || !worker->selfTest()) {
|
if (!worker || !worker->selfTest()) {
|
||||||
LOG_ERR("thread %zu error: \"hash self-test failed\".", worker->id());
|
LOG_ERR("%s " RED("thread ") RED_BOLD("#%zu") RED(" self-test failed"), T::tag(), worker->id());
|
||||||
|
|
||||||
delete worker;
|
delete worker;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define XMRIG_IBACKEND_H
|
#define XMRIG_IBACKEND_H
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
#include "rapidjson/fwd.h"
|
#include "rapidjson/fwd.h"
|
||||||
|
|
|
@ -24,13 +24,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
|
|
||||||
#include "backend/cpu/CpuLaunchData.h"
|
#include "backend/cpu/CpuLaunchData.h"
|
||||||
|
|
||||||
|
#include "backend/common/Tags.h"
|
||||||
#include "backend/cpu/CpuConfig.h"
|
#include "backend/cpu/CpuConfig.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
xmrig::CpuLaunchData::CpuLaunchData(const Miner *miner, const Algorithm &algorithm, const CpuConfig &config, const CpuThread &thread) :
|
xmrig::CpuLaunchData::CpuLaunchData(const Miner *miner, const Algorithm &algorithm, const CpuConfig &config, const CpuThread &thread) :
|
||||||
algorithm(algorithm),
|
algorithm(algorithm),
|
||||||
assembly(config.assembly()),
|
assembly(config.assembly()),
|
||||||
|
@ -65,3 +67,9 @@ xmrig::CnHash::AlgoVariant xmrig::CpuLaunchData::av() const
|
||||||
|
|
||||||
return static_cast<CnHash::AlgoVariant>(!hwAES ? (intensity + 5) : (intensity + 2));
|
return static_cast<CnHash::AlgoVariant>(!hwAES ? (intensity + 5) : (intensity + 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char *xmrig::CpuLaunchData::tag()
|
||||||
|
{
|
||||||
|
return cpu_tag();
|
||||||
|
}
|
||||||
|
|
|
@ -54,6 +54,8 @@ public:
|
||||||
inline bool operator!=(const CpuLaunchData &other) const { return !isEqual(other); }
|
inline bool operator!=(const CpuLaunchData &other) const { return !isEqual(other); }
|
||||||
inline bool operator==(const CpuLaunchData &other) const { return isEqual(other); }
|
inline bool operator==(const CpuLaunchData &other) const { return isEqual(other); }
|
||||||
|
|
||||||
|
static const char *tag();
|
||||||
|
|
||||||
const Algorithm algorithm;
|
const Algorithm algorithm;
|
||||||
const Assembly assembly;
|
const Assembly assembly;
|
||||||
const bool hugePages;
|
const bool hugePages;
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "backend/opencl/OclLaunchData.h"
|
#include "backend/opencl/OclLaunchData.h"
|
||||||
|
|
||||||
|
#include "backend/common/Tags.h"
|
||||||
#include "backend/opencl/OclConfig.h"
|
#include "backend/opencl/OclConfig.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,3 +47,9 @@ bool xmrig::OclLaunchData::isEqual(const OclLaunchData &other) const
|
||||||
return (other.algorithm == algorithm &&
|
return (other.algorithm == algorithm &&
|
||||||
other.thread == thread);
|
other.thread == thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char *xmrig::OclLaunchData::tag()
|
||||||
|
{
|
||||||
|
return ocl_tag();
|
||||||
|
}
|
||||||
|
|
|
@ -62,6 +62,8 @@ public:
|
||||||
inline bool operator!=(const OclLaunchData &other) const { return !isEqual(other); }
|
inline bool operator!=(const OclLaunchData &other) const { return !isEqual(other); }
|
||||||
inline bool operator==(const OclLaunchData &other) const { return isEqual(other); }
|
inline bool operator==(const OclLaunchData &other) const { return isEqual(other); }
|
||||||
|
|
||||||
|
static const char *tag();
|
||||||
|
|
||||||
cl_context ctx = nullptr;
|
cl_context ctx = nullptr;
|
||||||
const Algorithm algorithm;
|
const Algorithm algorithm;
|
||||||
const bool cache;
|
const bool cache;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue