RE: Performance Analyzer not analyzing threads
- From: v-wywang@xxxxxxxxxxxxxxxxxxxx ("Wen Yuan Wang [MSFT]")
- Date: Fri, 23 May 2008 06:46:39 GMT
Hello QSIDeveloper,
According to your description, you notice VS 2005 TE Performance Analyzer
cannot capture the function in multiple threads. It only captures the code
in main thread. If I misunderstood anything here, please don't hesitate to
correct me.
As far as I know, Performance profile captures the code in application,
even though it's a multiple threads application. I'm not sure what does the
code in your application look alike. But, in order to narrow down the
issue, I created a simple project to try with Performance profile. The code
is as below:
=========================================================
using System;
using System.Threading;
class ThreadTest
{
static void Main()
{
Thread regularThread = new Thread(new ThreadStart(ThreadMethod));
regularThread.Start();
regularThread.Join();
}
static void ThreadMethod()
{
string output = GetOutPut();
Console.WriteLine(output);
}
static string GetOutPut()
{
Thread.Sleep(5000);
return "Call GetOutPut Function";
}
}
=========================================================
After launched application in "Performance Explorer", I can find
"ThreadTest.GetOutPut()" function under "ThreadTest.ThreadMethod()" node in
"Call Tree" tab. It seems the GetOutPut() which is called in regularThread
has been captured by Performance Profile. Am I missing anything here? Could
you please try the above method and check if Performance Profile performs
the same behavior on your side? If you have any more concern or there is
anyting unclear, please also feel free to let us know. We are glad to
assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Prev by Date: Command reference
- Next by Date: Re: Command reference
- Previous by thread: Command reference
- Next by thread: Annoying editor feature that can't be turned off
- Index(es):
Relevant Pages
|