> > +
> > +void odp_sys_info_print(void)
> > +{
> > + printf("\n"
> > + "ODP system info\n"
> > + "---------------\n"
> > + "ODP API version: %s\n"
> > + "ODP impl name: %s\n"
> > + "CPU model: %s\n"
> > + "CPU freq (hz): %" PRIu64 "\n"
> > + "Cache line size: %i\n"
> > + "CPU count: %i\n"
> > + "\n",
> > + odp_version_api_str(), odp_version_impl_name(),
> > + odp_cpu_model_str(), odp_cpu_hz_max(),
> > + odp_sys_cache_line_size(), odp_cpu_count());
> > +
> > + sys_info_print_arch();
> > +}
>
> printf should be changed to ODP_LOG.
Log functions cannot handle inttypes (PRIu64) directly, but I'll try snprintf +
ODP_PRINT().
>
> What is the purpose of this API? There are commands in various OS to
> provide the system information. If an application wants to print the
> system information, it could do that using those commands. Those
> commands also provide more rich information than what is provided
> here. For ex: What is the amount of memory available, the frequency of
> the memory, number of memory channels, cache size (L1i, L1d, L2, L3)
> etc
Answered that for 1/8. The beef here is sys_info_print_arch() call, which
prints out tens of x86 cpu flags on a x86 system. This can print out anything,
hundreds of HW details that Linux do not know about / care about / do not give
you API. It's for implementer to print out all the debug information about the
system.
-Petri