Bug 41294 - Some Mono threadpool performance counters return 0
Summary: Some Mono threadpool performance counters return 0
Status: CONFIRMED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC All
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-24 16:33 UTC by Christopher Swiedler
Modified: 2017-10-06 21:04 UTC (History)
4 users (show)

See Also:
Tags: bugpool
Is this bug a regression?: ---
Last known good build:


Attachments
Sample code showing zeroed performance counters (549 bytes, text/plain)
2016-05-24 16:33 UTC, Christopher Swiedler
Details

Description Christopher Swiedler 2016-05-24 16:33:18 UTC
Created attachment 16091 [details]
Sample code showing zeroed performance counters

Some of the threadpool counters at http://www.mono-project.com/archived/mono_performance_counters/#category-mono-threadpool always return zero values. I can create the performance counters, but they never return correct values. The ones I've gotten this with are:

Work Items Added
Work Items Added/Sec
IO Work Items Added
IO Work Items Added/Sec

Sample code attached. Under mono 3.12, the work items added counter returns 10. Under mono 4.2.3, it returns 0.
Comment 1 Alex Rønne Petersen 2016-08-29 09:08:17 UTC
I can confirm that these counters don't get incremented. Probably an oversight when switching to the Microsoft thread pool code. Repro:

> using System;
> using System.Diagnostics;
> using System.Threading;
> class Program {
>     static void Main () {
>         var ctr = new PerformanceCounter ("Mono Threadpool", "Work Items Added");
>         for (var i = 0; i < 1024; i++)
>             ThreadPool.QueueUserWorkItem (_ => {});
>         Console.WriteLine (ctr.NextValue ());
>     }
> }


NEW -> ASSIGNED as Ludovic is assigned.
Comment 2 Ludovic Henry 2017-02-08 20:55:22 UTC
We acknowledge this enhancement request, therefore marked it as CONFIRMED.
However this does not necessarily mean we will take actions on it as we still need to discuss its feasibility internally and make sure it is not conflicting with other features.

Note You need to log in before you can comment on or make changes to this bug.