On Fri, Apr 21, 2017 at 11:42 AM, Brian Brooks <[email protected]> wrote:
> On 04/21 16:11:27, Petri Savolainen wrote: > > This information specifies the system where ODP application > > is running for debugging purposes. > > > > Signed-off-by: Petri Savolainen <[email protected]> > > --- > > include/odp/api/spec/system_info.h | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/include/odp/api/spec/system_info.h > b/include/odp/api/spec/system_info.h > > index 0bb4f1f1..ca4dcdc7 100644 > > --- a/include/odp/api/spec/system_info.h > > +++ b/include/odp/api/spec/system_info.h > > @@ -45,6 +45,15 @@ uint64_t odp_sys_page_size(void); > > int odp_sys_cache_line_size(void); > > > > /** > > + * Print system info > > I would advise that APIs return information that can be printed by > the application or used otherwise. An API like this indicates that > the implementation itself would be sending something to stdout; that > can be done by the application. > There is ample precedent in ODP for including APIs specifically for application debugging, e.g., odp_pool_print(), odp_buffer_print(), odp_packet_print(), so I don't see this as any different. There's a difference between APIs for debugging vs. logging. A debugging API would not be used in a production setting whereas a logging API would. For logging APIs we have the ability for the application to provide an overriding output function to allow it to consolidate or otherwise handle the processing of this output. > > > + * Print out implementation defined information about the system. This > > + * information is intended for debugging purposes and may contain e.g. > > + * information about CPUs, memory and other HW configuration. > > + */ > > +void odp_sys_info_print(void); > > + > > +/** > > * @} > > */ > > > > -- > > 2.11.0 > > >
