[igt-dev] [PATCH i-g-t 05/13] lib: Add GPU power measurement

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 4 10:25:19 UTC 2019


Quoting Katarzyna Dec (2019-02-04 10:05:36)
> On Mon, Feb 04, 2019 at 08:36:06AM +0000, Chris Wilson wrote:
> > +     oldlocale = setlocale(LC_ALL, "C");
> > +     v = strtod(buf, NULL);
> > +     setlocale(LC_ALL, oldlocale);
> Why we are first setting "C" locale and then restoring it? Is there a moment
> during mesurement when it is changed?

No, but it may be set in the environment for pretty-printing of output.
Thread-safety not guaranteed.
-Chris


More information about the igt-dev mailing list