Child pages
  • How to profile .NET Compact Framework applications

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites

...

Host computer software

...

  1. ActiveSync (for Windows XP, Windows Server 2003) / Windows Mobile Device Center (Windows Vista / Windows Server 2008 / Windows 7)
  2. .NET Compact Framework 2.0 SP1
  3. .NET Compact Framework 3.5 SP1
  4. Visual Studio 2005 SP1 or higher
  5. Windows Mobile 6 SDK
  6. PowerToys for .NET Compact Framework 3.5 (or higher)

Mobile device software

...

  1. .NET Compact Framework 3.5 SP1 (NETCFv35.wm.armv4i). If you are running from VS, it is installed automatically. If it is not installed, you can get it from "C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE"
  2. Your Windows Mobile application to test

    version

    is your .NET Compact Framework version.

    Note

    It may be necessary to place a config file to the application folder. The config file should follow the naming pattern <ApplicationName>.exe.config and contain the following data:

    Code Block
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <startup>
    <supportedRuntime version="v3.5.7283"/>
    <requiredRuntime version="v3.5.7283" safemode="true"/>
    </startup>
    </configuration>
    

    where

    Code Block

...

Guidelines

  1. Connect your device (this is optional if you plan 're going to use an emulator)
  2. Start dotTrace Performance.
  3. Select Profile -> "| Smart Device Application".
  4. Add a new Host host. Select your device from the list.
  5. Provide Path Specify the path to the application at the device.
  6. Click OK. The selected application will start at the device. Exercise it. Get Snapshot. We are done.

Possible known problems:

...

  1. Keep it running until you're ready to get a snapshot. Grab a snapshot, and you're done.

Known Issues

Invalid Index Error In Tracing Mode

Most likelу the error is caused by the a known bug in CompactFramework .NET Compact Framework 3.5.

The best workaround is switching to Sampling profiling type.
 
More about the bug.

If there is any exception in the application , which gets out of the Method, Property etc. then in Tracing mode the profiler stops getting notified about some framework events and thus failsbeing profiled in tracing mode throws an exception from a method, property etc., the profiler doesn't anymore get notified about certain framework events and fails with the "Invalid Index" error.

Here is an example of the valid code:

Code Block

try

...


\{                 throw new NotImplementedException();

...

             \}
catch
\{                 //do something;             \}

And the The example below will cause the "Invalid Index" error:

Code Block

private void button1_Click(object sender, EventArgs e)

...


\{

...


try

...


\{

...


MethodThrowingEx();

...


\}

...


catch

...


\{                 //do something;

...

             \}
\}
\}

private void MethodThrowingEx()
\{             throw new NotImplementedException();         \}

Can't Connect to Host. Unsupported Instruction Set


Most likely you are trying to profile a Windows CE 4.x application, which is not supported by dotTrace 4 Performance.0.3. The operation has been cancelled.

The Operation Has Been Cancelled

There are two known possible reasons:a) At some devices

  1. Some devices display a confirmation dialog

...

  1. box.

...

  1. If you don't explicitly agree,

...

  1. you

...

  1. get this error.

...

  1. There

...

  1. 's a

...

  1. 1-minute timeout for

...

  1. copying profile core dll and profiler core pdb to Windows folder in the device

...

  1. . You might get this error if data transfer speed is low.

How to

...

Diagnose

Start profiling when it starts and go navigate to Windows folder in the device Windows folder. Search for JetBrains.Profiler.Core.WinCE.YourProcessorType.dll and JetBrains.Profiler.Core.WinCE.YourProcessorType.pdb.

Search the same for these files at in dotTrace bin folder (C:\Program Files (x86)\JetBrains\dotTrace\v4.0\Bin). If they are different sizes when you get an error message, it means that the speed was the files in the two locations differ in size, data transfer rate is too low.

If you are using release build you will not see pdbs, they are not included, but if you are using nightly builds they are included.

The current workaround for the nightly build is to delete pdb file from dotTrace installation folder manually (It may be someting like C:\Program Files (x86)\JetBrains\dotTrace\v4.0\Bin).

4. Note that dotTrace Performance release builds only include the dll file. The pdb file is only included with nightly builds.

If you're experiencing this issue with a nightly build, try deleting the pdb file from dotTrace installation directory.

Missing dll file JetBrains.Profiler.Core.WinCE.ARMV4I_fp.dll

This issue was fixed . Please, download new dotTrace version from http://confluence.jetbrains.net/display/NetProf/in dotTrace Performance 4.0.1+Nightly+Builds. Please download the latest product version.