From 392f6325e097e91c2e241f4fca0118cec177ed6e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 12 Jan 2010 10:53:25 -0800 Subject: [PATCH] (SIGAR-196) use pst_processor.psp_cpu_frequency to calculate cpu_info.mhz on HP-UX 11.31+ --- src/os/hpux/hpux_sigar.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index 9109a982..48d21e54 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -715,7 +715,11 @@ int sigar_cpu_info_list_get(sigar_t *sigar, SIGAR_SSTRCPY(info->vendor, "HP"); /*XXX*/ SIGAR_SSTRCPY(info->model, "PA RISC"); /*XXX*/ #endif +#ifdef PSP_MAX_CACHE_LEVELS /* 11.31+; see SIGAR-196 */ + info->mhz = proc.psp_cpu_frequency / 1000000; +#else info->mhz = sigar->ticks * proc.psp_iticksperclktick / 1000000; +#endif info->cache_size = SIGAR_FIELD_NOTIMPL; /*XXX*/ }