[Mono-bugs] [Bug 523052] New: Process PerformanceCounters broken
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jul 17 11:36:55 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=523052
Summary: Process PerformanceCounters broken
Classification: Mono
Product: Mono: Runtime
Version: 2.4.x
Platform: x86-64
OS/Version: SLES 10
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: jacob.gladish at sig.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727;
InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152;
NET CLR 3.5.30729)
When sampling the "% User Time" performance counter for a process outside the
mono runtime, all values are reported as zero.
Reproducible: Always
Steps to Reproduce:
1. Run sample app to query processor usage for a process
2. Compare with top
3.
Actual Results:
reports zero
Expected Results:
Some value similar to top
This patch seems to work for me
amsdevbal801# diff mono-proclib.orig.c mono-proclib.c
134c134
< rbuf [blen - 1] = 0;
---
> rbuf [MIN(len,blen) - 1] = 0;
282,283c282,283
< /* return milliseconds */
< return (val * 1000) / get_user_hz ();
---
> /* return 100ns ticks */
> return (val * 10000000) / get_user_hz ();
319c319
< return get_process_stat_time (rpid, 12, FALSE, error);
---
> return get_process_stat_time (rpid, 10, FALSE, error);
321c321
< return get_process_stat_time (rpid, 13, FALSE, error);
---
> return get_process_stat_time (rpid, 11, FALSE, error);
323c323
< return get_process_stat_time (rpid, 12, TRUE, error);
---
> return get_process_stat_time (rpid, 10, TRUE, error);
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list