6#if defined(DART_HOST_OS_LINUX)
24#if defined(HOST_ARCH_IA32) || defined(HOST_ARCH_X64)
32#elif defined(HOST_ARCH_ARM)
40#elif defined(HOST_ARCH_ARM64)
48#elif defined(HOST_ARCH_RISCV32) || defined(HOST_ARCH_RISCV64)
53#error Unrecognized target architecture
70 if (field ==
nullptr)
return false;
71 bool contains = (strstr(field, search_string) !=
nullptr);
72 free(
const_cast<char*
>(field));
75 return ProcCpuInfo::FieldContains(
FieldName(idx), search_string);
85 return ProcCpuInfo::ExtractField(
FieldName(idx));
98 return ProcCpuInfo::HasField(field);
static const char * field(CpuInfoIndices idx)
static const char * FieldName(CpuInfoIndices idx)
static bool FieldContains(CpuInfoIndices idx, const char *search_string)
static bool HasField(const char *field)
constexpr bool contains(std::string_view str, std::string_view needle)