Commit af299e7e authored by Fabrice Fontaine's avatar Fabrice Fontaine

profiled_coordinator.hpp: check for RUSAGE_THREAD

RUSAGE_THREAD is not defined on uclibc, so use RUSAGE_SELF if
RUSAGE_THREAD is undefined
Signed-off-by: default avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
parent 3d7851f8
...@@ -113,7 +113,11 @@ public: ...@@ -113,7 +113,11 @@ public:
m.mem = 0; m.mem = 0;
#else #else
::rusage ru; ::rusage ru;
#ifdef RUSAGE_THREAD
::getrusage(RUSAGE_THREAD, &ru); ::getrusage(RUSAGE_THREAD, &ru);
#else
::getrusage(RUSAGE_SELF, &ru)
#endif
m.usr = to_usec(ru.ru_utime); m.usr = to_usec(ru.ru_utime);
m.sys = to_usec(ru.ru_stime); m.sys = to_usec(ru.ru_stime);
m.mem = ru.ru_maxrss; m.mem = ru.ru_maxrss;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment