Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Code Analysis, Thread optimization

Code Analysis, Thread optimization

Scheduled Pinned Locked Moved C#
algorithmstoolsperformancehelpquestion
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jon Hulatt
    wrote on last edited by
    #1

    Hi All, My multithreaded app seems a little slow, and i'm not really sure where the cpu time is going. I suspect that i'm wasting time waiting for locks etc, and could probably structure the code a little better. but are there are tools that help you analyse what threads are doing? - how much cpu time each thread is using - how much time each thread spends blocking on a lock object etc. trying to diagnose the issues without better tools is going to be hard. Thanks Jon

    using System.Beer;

    A S E 4 Replies Last reply
    0
    • J Jon Hulatt

      Hi All, My multithreaded app seems a little slow, and i'm not really sure where the cpu time is going. I suspect that i'm wasting time waiting for locks etc, and could probably structure the code a little better. but are there are tools that help you analyse what threads are doing? - how much cpu time each thread is using - how much time each thread spends blocking on a lock object etc. trying to diagnose the issues without better tools is going to be hard. Thanks Jon

      using System.Beer;

      A Offline
      A Offline
      Amar Chaudhary
      wrote on last edited by
      #2

      i have the same problem and currently downloading intel Vtune evaluation copy lets see if it helps

      N 1 Reply Last reply
      0
      • J Jon Hulatt

        Hi All, My multithreaded app seems a little slow, and i'm not really sure where the cpu time is going. I suspect that i'm wasting time waiting for locks etc, and could probably structure the code a little better. but are there are tools that help you analyse what threads are doing? - how much cpu time each thread is using - how much time each thread spends blocking on a lock object etc. trying to diagnose the issues without better tools is going to be hard. Thanks Jon

        using System.Beer;

        A Offline
        A Offline
        Amar Chaudhary
        wrote on last edited by
        #3

        I try starting it after installing but my system get crashed every time please let me know if you get a better option

        1 Reply Last reply
        0
        • J Jon Hulatt

          Hi All, My multithreaded app seems a little slow, and i'm not really sure where the cpu time is going. I suspect that i'm wasting time waiting for locks etc, and could probably structure the code a little better. but are there are tools that help you analyse what threads are doing? - how much cpu time each thread is using - how much time each thread spends blocking on a lock object etc. trying to diagnose the issues without better tools is going to be hard. Thanks Jon

          using System.Beer;

          S Offline
          S Offline
          S Senthil Kumar
          wrote on last edited by
          #4

          For figuring out the CPU time used by each thread, I'd suggest using Process Explorer[^]. It allows you to drill down into threads and watch CPU time. To find the contention rate among threads, you can use Perfmon (type perfmon.msc at the command prompt). The ".NET CLR LocksAndThreads" Performance Object has "Total # of contentions" and "Contention Rate/sec" counters, you need to just add them, making sure you select your process from the processes list on the right. Hope this helps.

          Regards Senthil [MVP - Visual C#] _____________________________ My Blog | My Articles | My Flickr | WinMacro

          1 Reply Last reply
          0
          • A Amar Chaudhary

            i have the same problem and currently downloading intel Vtune evaluation copy lets see if it helps

            N Offline
            N Offline
            Nadia Monalisa
            wrote on last edited by
            #5

            Hello, is it (Vtune) really useful for C# code ? I di not see any feature in VTUNE so that i Know exactly which code segment is taking more CPU time ? I know VTUNE support C language, but I did not see any C# supports. When I tried to see the code, VTUNE exposed me the ASSEMBLY code for the given EXE file. Obviously seeing Assembly code will not make any sense for me to debug High Level C# code, aint i right ? would you Please let me know if I can make it useful for c# ?

            C A 2 Replies Last reply
            0
            • N Nadia Monalisa

              Hello, is it (Vtune) really useful for C# code ? I di not see any feature in VTUNE so that i Know exactly which code segment is taking more CPU time ? I know VTUNE support C language, but I did not see any C# supports. When I tried to see the code, VTUNE exposed me the ASSEMBLY code for the given EXE file. Obviously seeing Assembly code will not make any sense for me to debug High Level C# code, aint i right ? would you Please let me know if I can make it useful for c# ?

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              bashiwala wrote:

              Obviously seeing Assembly code will not make any sense for me to debug High Level C# code

              Why?

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

              1 Reply Last reply
              0
              • N Nadia Monalisa

                Hello, is it (Vtune) really useful for C# code ? I di not see any feature in VTUNE so that i Know exactly which code segment is taking more CPU time ? I know VTUNE support C language, but I did not see any C# supports. When I tried to see the code, VTUNE exposed me the ASSEMBLY code for the given EXE file. Obviously seeing Assembly code will not make any sense for me to debug High Level C# code, aint i right ? would you Please let me know if I can make it useful for c# ?

                A Offline
                A Offline
                Amar Chaudhary
                wrote on last edited by
                #7

                its working now its integrated in vs ide and it shows the code and lots of other information i need to study more what it shows but its working perfectly with c# however it require more ram and processor speed so it will be better to increase virtual memory before hand to know how it works please read the tutorial attached with VTune demo it is of about one hour

                1 Reply Last reply
                0
                • J Jon Hulatt

                  Hi All, My multithreaded app seems a little slow, and i'm not really sure where the cpu time is going. I suspect that i'm wasting time waiting for locks etc, and could probably structure the code a little better. but are there are tools that help you analyse what threads are doing? - how much cpu time each thread is using - how much time each thread spends blocking on a lock object etc. trying to diagnose the issues without better tools is going to be hard. Thanks Jon

                  using System.Beer;

                  E Offline
                  E Offline
                  ejuanpp
                  wrote on last edited by
                  #8

                  Hi, what about Rational PurifyPlus ? Regards

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups