Traceview

====================================WARNING=====================================
This procedure no longer recommended. There are much simpler short-cuts
in %Release%\%OS%\Tests\Trace\Trace*.bat, see Readme.txt for usage details.

Advantages of using Trace*.bat:
1. All driver activities are captured in a single file, no tedious configuration
    steps for each component
1.1 BcmGnss.dll
1.2 BcmGnssAtRil.dll
1.3 BcmGnssBus.sys
1.4 BcmGnssLocationSensor.dll
2. Millisecond timestamps on all entries
3. No spinning-circle as in traceview buffer copying
====================================WARNING=====================================

This document describes how to configure traceview.exe to log driver activities.
Additional description from Microsoft can be found at 
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553872(v=vs.85).aspx

1. Run %Release%\%OS%\install_pdb.bat as administrator to install GPS pdb files.

2.1 Run traceview.exe as administrator
2.1.1 [TraceView/menu/File/Create New Log Session] to open 
"Create New Log Session"
2.1.1.1 Click "Add Provider" to open "provider Control GUID Setup"
2.1.1.1.1 Check "PDB (Debug Information) File" and click "..."
2.1.1.1.1.1 Navigate to C:\Windows\System32\Drivers\UMDF
2.1.1.1.1.1.1 Select "BcmGnssAtRil.pdb" and click "Open"
2.1.1.1.2 Click "OK"
2.1.1.2 Repeat step 2.1.1.1 for "BcmGnssBus.pdb"
2.1.1.3 Repeat step 2.1.1.1 for "BcmGnssLocationSensor.pdb"
2.1.1.2 Under "Create New Log Session", click "Next >" to open 
"Log Session Options"
2.1.1.2.1 Set [Log Session Name] as "umdf"
2.1.1.2.2 Next to [Set Flags and Level], click ">>" to open 
"Tracing Flags and Level Selection"
2.1.1.2.2.1 Double-click on "Level" and check "Verbose" for all providers
2.1.1.2.2.2 Click "OK" to close "Tracing Flags and Level Selection"
2.1.1.2.3 Under "Log Session Options", next to [Advanced Log Session Options], 
click ">>" to open "Advanced Log Session Options"
2.1.1.2.3.1 Check "Create Listing File" and click "..."
2.1.1.2.3.1.1 Navigate to %Release%\%OS%\ and set [File name:] as "trace.txt"
2.1.1.2.3.1.2 Set [Files of type:] as "Text Files (*.txt)", then click "Open"
2.1.1.2.3.1.3 Click "Yes" for [Create the file?]
2.1.1.2.3.2 Under "Advanced Log Session Options", click "OK" to close
2.1.1.2.4 Under "Log Session Options", check "Log Trace Event Data To File"
2.1.1.2.5 Optional: Next to [Log File Name], click "..."
2.1.1.2.5.1 Navigate to %Release%\%OS%\ and set [File name:] as "trace.etl"
2.1.1.2.6 Under "Log Session Options", click "Finish" to close

2.1.2 On the lower pane, right-click on "System Time", and check the following
2.1.2.1 Name
2.1.2.2 Message
2.1.2.3 File Name
2.1.2.4 Line#
2.1.2.5 Process ID
2.1.2.6 Thread ID
2.1.2.7 System Time
2.1.2.8 Func Name --> This is optional
2.1.2.9 Click "Save As Default"

2.1.3 On the upper pane, right-click on "umdf" and choose "Save Workspace..."
2.1.3.1 Set [New Workspace:] to "umdf", then click "OK"

2.1.4 Close Traceview
2.1.4.1 This will cause the files in sections 2.1.1.2.3.1.1 and 2.1.1.2.5.1 to
be saved.

2.2 Right-click on [taskbar/traceview/TraceView Application] and choose 
"Ping this program to taskbar"

2.3 Right-click on [taskbar/traceview/TraceView Application] and choose 
properties
2.3.1 Click "Advanced..."
2.3.1.1 Check "Run as administrator"
2.3.1.2 Click "OK"
2.3.2 Click "OK"

2.4 On taskbar, click on [taskbar/traceview/TraceView Application], and validate
[User Account Control] windows shows up, then click "Yes"
2.4.1 [TraceView/menu/File/Open Workspace...] and choose "umdf", then click "OK"
2.4.2 Validate [Group ID / Session Name] is "0 umdf" and [State] is "RUNNING"
2.4.3 Validate the lower pan contains columns
2.4.3.1 Name
2.4.3.2 File Name
2.4.3.3 Line#
2.4.3.4 Process ID
2.4.3.5 Thread ID
2.4.3.6 System Time
2.4.3.7 Message
2.4.4 Run SensorDiagnosticTool.exe (SDT) and validate lines streaming out on 
the lower pane
2.4.5 Close SDT and validate termination of streaming
2.4.6 Right-click on the streaming area and choose "AutoFit Columns"
2.4.7 Scroll all the way up and select the first line
2.4.8 Scroll all the way down and select the last line
2.4.9 Right-click on the streaming area and choose "Copy", then paste the data
onto notepad++
2.4.10 Right-click on the streaming area and choose "Clear Display"
