Bug 664934 - Add user and system usage in GeckoLibLoad log. r=mwu

This commit is contained in:
Mike Hommey 2011-06-17 08:59:39 +02:00
Родитель 2cce700272
Коммит b9445d6670
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -694,8 +694,10 @@ loadLibs(const char *apkName)
gettimeofday(&t1, 0);
struct rusage usage2;
getrusage(RUSAGE_SELF, &usage2);
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Loaded libs in %dms total, %d faults",
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Loaded libs in %dms total, %dms user, %dms system, %d faults",
(t1.tv_sec - t0.tv_sec)*1000 + (t1.tv_usec - t0.tv_usec)/1000,
(usage2.ru_utime.tv_sec - usage1.ru_utime.tv_sec)*1000 + (usage2.ru_utime.tv_usec - usage1.ru_utime.tv_usec)/1000,
(usage2.ru_stime.tv_sec - usage1.ru_stime.tv_sec)*1000 + (usage2.ru_stime.tv_usec - usage1.ru_stime.tv_usec)/1000,
usage2.ru_majflt-usage1.ru_majflt);
}