Haiku build fix.

Haiku does not provide page faults statistics only system wide.
This commit is contained in:
David Carlier 2020-09-10 18:49:19 +00:00
parent d8f8159dda
commit 568d6e532b

View File

@ -497,7 +497,9 @@ static void mi_stat_process_info(mi_msecs_t* utime, mi_msecs_t* stime, size_t* c
getrusage(RUSAGE_SELF, &rusage); getrusage(RUSAGE_SELF, &rusage);
*utime = timeval_secs(&rusage.ru_utime); *utime = timeval_secs(&rusage.ru_utime);
*stime = timeval_secs(&rusage.ru_stime); *stime = timeval_secs(&rusage.ru_stime);
#if !defined(__HAIKU__)
*page_faults = rusage.ru_majflt; *page_faults = rusage.ru_majflt;
#endif
// estimate commit using our stats // estimate commit using our stats
*peak_commit = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.peak)); *peak_commit = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.peak));
*current_commit = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.current)); *current_commit = (size_t)(mi_atomic_loadi64_relaxed((_Atomic(int64_t)*)&_mi_stats_main.committed.current));