├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── docs ├── open-ms-store.png ├── revision_history.txt └── tracex_gui.png ├── installer ├── README.txt └── tracex_installer_release.iss ├── scripts ├── build_tracex.cmd ├── build_tracex_msix_package.cmd ├── download_vc_redist.cmd ├── download_vc_redist.ps1 ├── generate_tracex_installer.cmd ├── install_inno_setup.ps1 ├── run-pwsh.cmd └── win-installer-helper.psm1 └── src ├── .editorconfig ├── CodeMaid.config ├── ELTMLManaged ├── AssemblyInfo.cpp ├── ELTMLManaged.cpp ├── ELTMLManaged.h ├── ELTMLManaged.vcproj ├── ELTMLManaged.vcproj.vspscc ├── ELTMLManaged.vcxproj ├── README.txt ├── Stdafx.cpp ├── Stdafx.h ├── app.ico ├── app.rc ├── resource.h ├── tml_library.cpp └── tml_library.h ├── MsixPackageProject ├── CustomEvents │ └── tracex_custom.trxc ├── Images │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LockScreenLogo.scale-200.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.backup.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── TraceX-icon-8-20-2020.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── MsixPackageProject.sln ├── MsixPackageProject.wapproj ├── Package.appxmanifest ├── README.txt └── TraceFiles │ ├── demo_filex.trx │ ├── demo_netx_tcp.trx │ ├── demo_netx_udp.trx │ └── demo_threadx.trx ├── README.txt ├── TraceLibraryInterop ├── Properties │ └── AssemblyInfo.cs ├── TMLDefines.cs ├── TMLFunctions.cs ├── TMLStructs.cs ├── TraceLibraryInterop.csproj └── TraceLibraryInterop.csproj.vspscc ├── TraceX.ico ├── TraceX.sln ├── TraceX.suo └── TraceX ├── App.xaml ├── App.xaml.cs ├── ClassDiagram1.cd ├── Code ├── Event.cs ├── EventArrays.cs ├── EventInfoDict.cs ├── EventInfoTypes.cs ├── EventTypeDict.cs ├── IDetailsWindowManager.cs ├── IEventIndicator.cs ├── Indicator.cs ├── Information.cs ├── NavEventArgs.cs ├── PopServItem.cs ├── PopServItemTypeListViewItem.cs ├── ThreadComparer.cs ├── ThreadStackUsageItem.cs ├── ThreadStackUsageItemTypeListViewItem.cs ├── TraceFileInfo.cs ├── TraceViewConstant.cs └── menuInformation.cs ├── Components ├── DeltaWindow.xaml ├── DeltaWindow.xaml.cs ├── DetailsWindow.xaml ├── DetailsWindow.xaml.cs ├── EventComparer.cs ├── ITraceView.cs ├── Navigator.xaml ├── Navigator.xaml.cs ├── RecentFileList.cs ├── SequentialView.xaml ├── SequentialView.xaml.cs ├── TimeView.xaml ├── TimeView.xaml.cs ├── TraceViewControl.cs ├── ZoomToolBar.xaml └── ZoomToolBar.xaml.cs ├── Dialogs ├── CurrentEventInfo.xaml ├── CurrentEventInfo.xaml.cs ├── ExecutionProfile.xaml ├── ExecutionProfile.xaml.cs ├── FileXStatistics.xaml ├── FileXStatistics.xaml.cs ├── FindByValue.xaml ├── FindByValue.xaml.cs ├── HeaderInfo.xaml ├── HeaderInfo.xaml.cs ├── Legend.xaml ├── Legend.xaml.cs ├── NetXStatistics.xaml ├── NetXStatistics.xaml.cs ├── PerformStats.xaml ├── PerformStats.xaml.cs ├── PopularServices.xaml ├── PopularServices.xaml.cs ├── StackUsage.xaml └── StackUsage.xaml.cs ├── Images ├── Event.ico ├── Event.jpg ├── Find_24x24.png ├── Find_24x24_end.png ├── Information_24x24.png ├── Open_24x24.png ├── Open_32x32.png ├── Play_16x16.png ├── Play_16x16_end.png ├── Play_24x24.png ├── Play_24x24_end.png ├── Play_24x24_next.png ├── Play_24x24_previous.png ├── Play_32x32.png ├── Play_32x32_end.png ├── Print_24x24.png ├── Print_32x32.png ├── SingleEventDetail_32x32.png ├── SingleEventDetail_32x32_end.png ├── TraceX.ico ├── Zoom_In_24x24.png ├── Zoom_In_32x32.png ├── Zoom_In_32x32_end.png ├── Zoom_Out_24x24.png ├── Zoom_Out_32x32.png ├── Zoom_Out_32x32_end.png ├── black_triangle_24x24.gif ├── cpu_utilization.png ├── execution_profile.png ├── execution_profile_end.png ├── preformance_statitics.png ├── preformance_statitics_end.png ├── separator.png ├── thread_stack.png ├── thread_stack_end.png ├── tracexlogo.jpg ├── zoom_in.png └── zoom_out.png ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── Settings.cs ├── Settings.xaml ├── Splash.xaml ├── Splash.xaml.cs ├── TraceX.csproj ├── TraceX.csproj.vspscc ├── TraceX.ico ├── TraceXView.xaml ├── TraceXView.xaml.cs └── app.config /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Eclipse ThreadX 2 | 3 | Thanks for your interest in this project. 4 | 5 | ## Project description 6 | 7 | Eclipse ThreadX provides a vendor-neutral, open source, safety certified OS for 8 | real-time applications published on under a permissive license. The Eclipse 9 | ThreadX suite encompasses: 10 | * ThreadX - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications 11 | * NetX Duo - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications 12 | * FileX - high-performance, FAT-compatible file system that’s fully integrated with ThreadX kernel 13 | * GUIX - provides a complete, embedded graphical user interface (GUI) library 14 | * USBX - high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with ThreadX kernel 15 | * LevelX - Flash Wear Leveling for FileX and stand-alone purposes 16 | * GuiX Studio - design environment, facilitating the creation and maintenance of all graphical elements for GUIX 17 | * TraceX - analysis tool that provides a graphical view of real-time system events to better understand the behavior of real-time systems 18 | 19 | Project site: https://projects.eclipse.org/projects/iot.threadx 20 | 21 | ## Terms of Use 22 | 23 | This repository is subject to the Terms of Use of the Eclipse Foundation 24 | https://www.eclipse.org/legal/termsofuse.php 25 | 26 | ## Developer resources 27 | 28 | Information regarding source code management, builds, coding standards, and more. 29 | https://projects.eclipse.org/projects/iot.threadx/developer 30 | 31 | The project maintains the following source code repositories 32 | 33 | * https://github.com/eclipse-threadx/.github 34 | * https://github.com/eclipse-threadx/cmsis-packs 35 | * https://github.com/eclipse-threadx/filex 36 | * https://github.com/eclipse-threadx/getting-started 37 | * https://github.com/eclipse-threadx/guix 38 | * https://github.com/eclipse-threadx/levelx 39 | * https://github.com/eclipse-threadx/netxduo 40 | * https://github.com/eclipse-threadx/rtos-docs 41 | * https://github.com/eclipse-threadx/samples 42 | * https://github.com/eclipse-threadx/threadx 43 | * https://github.com/eclipse-threadx/threadx-learn-samples 44 | * https://github.com/eclipse-threadx/tracex 45 | * https://github.com/eclipse-threadx/usbx 46 | 47 | ## Eclipse Development Process 48 | 49 | This Eclipse Foundation open project is governed by the Eclipse Foundation 50 | Development Process and operates under the terms of the Eclipse IP Policy. 51 | 52 | * https://eclipse.org/projects/dev_process 53 | * https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf 54 | 55 | ## Eclipse Contributor Agreement 56 | 57 | In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA). 58 | https://www.eclipse.org/legal/ECA.php 59 | 60 | The ECA provides the Eclipse Foundation with a permanent record that you agree 61 | that each of your contributions will comply with the commitments documented in 62 | the Developer Certificate of Origin (DCO). Having an ECA on file associated with 63 | the email address matching the "Author" field of your contribution's Git commits 64 | fulfills the DCO's requirement that you sign-off on your contributions. 65 | 66 | For more information, please see the Eclipse Committer Handbook: 67 | https://www.eclipse.org/projects/handbook/#resources-commit 68 | 69 | ## Contact 70 | 71 | Contact the project developers via the project's "dev" list. 72 | https://accounts.eclipse.org/mailing-list/threadx-dev 73 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 - present Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Eclipse ThreadX TraceX 2 | 3 | Eclipse ThreadX TraceX is a host-based analysis tool that provides developers with a graphical view of real-time system events and enables them to visualize and better understand the behavior of their real-time systems. With TraceX, developers can see clearly the occurrence of system events like interrupts and context switches that occur out of view of standard debugging tools. The ability to identify and study these events, and to pinpoint the timing of their occurrence in the context of the overall system’s operation enables developers to resolve programming problems by finding unexpected behavior and letting them investigate specific areas further Trace information is stored in a buffer on the target system, with the buffer location and size determined by the application at run-time. TraceX can process any buffer constructed in the proper manner, not only from Eclipse ThreadX RTOS, but from any application or RTOS. The trace information may be uploaded to the host for analysis at any time – either post mortem or upon a breakpoint. Eclipse ThreadX RTOS implements a circular buffer, which enables the most recent “N” events to be available for inspection in the event of system malfunction or other significant event. 4 | 5 | The Eclipse ThreadX TraceX installer is available here: https://aka.ms/azrtos-tracex-installer. 6 | 7 | ## Getting Started 8 | 9 | See [Overview of TraceX](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/tracex/overview-tracex.md) for the high-level overview. 10 | 11 | ## Repository Structure and Usage 12 | 13 | ### Directory layout 14 | 15 | . 16 | ├── installer # TraceX installer generator 17 | ├── src # Source files 18 | ├── LICENSE.txt # License terms 19 | ├── LICENSE-HARDWARE.txt # Licensed hardware from semiconductors 20 | ├── CONTRIBUTING.md # Contribution guidance 21 | └── SECURITY.md # Repo security guidance 22 | 23 | ### Branches & Releases 24 | 25 | The master branch has the most recent code with all new features and bug fixes. It does not represent the latest General Availability (GA) release of the library. Each official release (preview or GA) will be tagged to mark the commit and push it into the Github releases tab, e.g. `v6.2-rel`. 26 | 27 | > When you see xx-xx-xxxx, 6.x or x.x in function header, this means the file is not officially released yet. They will be updated in the next release. See example below. 28 | ``` 29 | /**************************************************************************/ 30 | /* */ 31 | /* FUNCTION RELEASE */ 32 | /* */ 33 | /* _tx_initialize_low_level Cortex-M23/GNU */ 34 | /* 6.x */ 35 | /* AUTHOR */ 36 | /* */ 37 | /* Scott Larson, Microsoft Corporation */ 38 | /* */ 39 | /* DESCRIPTION */ 40 | /* */ 41 | /* This function is responsible for any low-level processor */ 42 | /* initialization, including setting up interrupt vectors, setting */ 43 | /* up a periodic timer interrupt source, saving the system stack */ 44 | /* pointer for use in ISR processing later, and finding the first */ 45 | /* available RAM memory address for tx_application_define. */ 46 | /* */ 47 | /* INPUT */ 48 | /* */ 49 | /* None */ 50 | /* */ 51 | /* OUTPUT */ 52 | /* */ 53 | /* None */ 54 | /* */ 55 | /* CALLS */ 56 | /* */ 57 | /* None */ 58 | /* */ 59 | /* CALLED BY */ 60 | /* */ 61 | /* _tx_initialize_kernel_enter ThreadX entry function */ 62 | /* */ 63 | /* RELEASE HISTORY */ 64 | /* */ 65 | /* DATE NAME DESCRIPTION */ 66 | /* */ 67 | /* 09-30-2020 Scott Larson Initial Version 6.1 */ 68 | /* xx-xx-xxxx Scott Larson Include tx_user.h, */ 69 | /* resulting in version 6.x */ 70 | /* */ 71 | /**************************************************************************/ 72 | ``` 73 | 74 | ### Installation 75 | 76 | You can obtain the TraceX app from the [Microsoft App Store](https://microsoft.com/store/apps) by searching for TraceX, or by going directly to [the TraceX page](https://www.microsoft.com/p/azure-rtos-tracex/9nf1lfd5xxg3?activetab=pivot:overviewtab). Then do the following. 77 | 78 | 1. From the TraceX page in the App Store, click the **Get** or **Install** button to install TraceX. 79 | 80 | 1. Your browser may display a message asking if you want to open the Microsoft Store, as shown in the figure below. If it does, choose the **Open** button. 81 | ![Choose Open to install TraceX.](./docs/open-ms-store.png) 82 | 83 | 1. When the install finishes, choose the **Launch** button. 84 | 85 | ### Use of Eclipse ThreadX TraceX 86 | Using TraceX is as easy as opening a trace file inside TraceX! Run TraceX via the ***Start*** button. At this point you will observe the TraceX graphic user interface (GUI). You are now ready to use TraceX to graphically view an existing target trace buffer. This is easily done by clicking ***File -> Open,*** then entering the binary trace file. 87 | 88 | >[!IMPORTANT] 89 | >*You can also double-click on any trace file with an extension of **trx,** which will automatically launch TraceX.* 90 | 91 | ![Screenshot of the TraceX GUI.](./docs/tracex_gui.png) 92 | 93 | ## Licensing 94 | 95 | License terms for using Eclipse ThreadX are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information. 96 | 97 | ## Resources 98 | 99 | The following are references to additional Eclipse ThreadX resources: 100 | 101 | - **Product introduction**: https://github.com/eclipse-threadx/rtos-docs 102 | - **Product issues and bugs, or feature requests**: https://github.com/eclipse-threadx/tracex/issues 103 | - **TraceX Installer**: https://aka.ms/azrtos-tracex-installer 104 | 105 | You can also check [previous questions](https://stackoverflow.com/questions/tagged/azure-rtos+tracex) or ask new ones on StackOverflow using the `threadx` and `tracex` tags. 106 | 107 | ## Security 108 | 109 | Eclipse ThreadX provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device fully meets the evolving security requirements associated with its specific use case. 110 | 111 | ## Contribution 112 | 113 | Please follow the instructions provided in the [CONTRIBUTING.md](./CONTRIBUTING.md) for the corresponding repository. 114 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 6.4.x | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | If you think you have found a vulnerability in you can report it using one of the following ways: 12 | 13 | * Contact the [Eclipse Foundation Security Team](mailto:security@eclipse-foundation.org) 14 | * [Report a Vulnerability](https://github.com/eclipse-threadx/tracex/security/advisories/new) 15 | 16 | You can find more information about reporting and disclosure at the [Eclipse Foundation Security page](https://www.eclipse.org/security/). 17 | 18 | ## Security Policy 19 | 20 | This project follows [Eclipse Foundation Vulnerability Reporting Policy](https://www.eclipse.org/security/policy/). 21 | -------------------------------------------------------------------------------- /docs/open-ms-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/docs/open-ms-store.png -------------------------------------------------------------------------------- /docs/revision_history.txt: -------------------------------------------------------------------------------- 1 | TraceX 2 | 3 | For version 6 and higher, please refer to the release notes on GitHub at https://github.com/eclipse-threadx/tracex/releases. 4 | Below is the revision history for 5.x. 5 | 6 | 05/05/2009 TraceX version 5.0.1. This release includes the following 7 | modifications: 8 | 9 | - Added tool bar for various navigation and control buttons. 10 | - Added zoom in/out features. 11 | - Added ability to calculate the ticks between any two events 12 | in the trace. 13 | - Added enhanced navigation facilities to search forward/backward 14 | on a specific object, event ID, context, or context switch. 15 | - Added context information for each context upon mouse-over. 16 | - Added ability to reorder context entries. 17 | - Added FileX and NetX support, including run-time analysis. 18 | - Added priority inversion detection and display. 19 | - Added raw trace dump capability. 20 | - Added ability to automatically convert input files in HEX or 21 | Motorola S-record format. 22 | - Corrected a run-time analysis problem detecting context switches 23 | that occur between the first and second event. 24 | - Improved trace accuracy. 25 | - Updated TraceX User Guide. -------------------------------------------------------------------------------- /docs/tracex_gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/docs/tracex_gui.png -------------------------------------------------------------------------------- /installer/README.txt: -------------------------------------------------------------------------------- 1 | 2 | To generate TraceX installer, follow these steps: 3 | 4 | 1) Install Inno Setup from the following link: 5 | 6 | http://www.jrsoftware.org/isinfo.php 7 | 8 | 2) Build TraceX executable: 9 | Execute script "build_tracex.cmd" from scripts folder. 10 | 11 | 3) Download Microsoft Visual C++ Redistributable: 12 | Execute script "download_vc_redist.cmd" from scripts folder to download the Microsoft Visual C++ Redistributable package. 13 | This package is essential for installing Microsoft C and C++(MSVC) runtime libraries. 14 | 15 | 4)Run the Inno Setup compiler: 16 | Launch the Inno Setup compiler and open /installer/tracex_installer_release.iss. 17 | Click the compiler button. When the compiler runs cleanly, the installer is generated in output folder. 18 | -------------------------------------------------------------------------------- /installer/tracex_installer_release.iss: -------------------------------------------------------------------------------- 1 | ; Script generated by the Inno Setup Script Wizard. 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 3 | 4 | [Setup] 5 | ; NOTE: The value of AppId uniquely identifies this application. 6 | ; Do not use the same AppId value in installers for other applications. 7 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 8 | AppId={{1D4932BC-ACD4-4292-9530-92C8BE2E58CF} 9 | AppName=TraceX 10 | AppVersion=6.4.1.0 11 | AppPublisher=Eclipse Foundation 12 | AppPublisherURL=https://threadx.io/ 13 | AppSupportURL=https://threadx.io/ 14 | AppUpdatesURL=https://threadx.io/ 15 | DefaultDirName={sd}\Eclipse_ThreadX\TraceX_6.4 16 | DefaultGroupName=Eclipse ThreadX 17 | CloseApplications=no 18 | ;LicenseFile= 19 | OutputBaseFilename=trace_studio_setup_version_6.4.1.0 20 | SetupIconFile=src\TraceX.ico 21 | Compression=lzma 22 | SolidCompression=yes 23 | ChangesAssociations=yes 24 | UsePreviousAppDir=no 25 | ;SignedUninstaller=yes 26 | ;SignTool= 27 | 28 | SourceDir=..\ 29 | OutputDir=installer\output 30 | 31 | [Languages] 32 | Name: "english"; MessagesFile: "compiler:Default.isl" 33 | 34 | [CustomMessages] 35 | AskAssociate=Associate the TraceX application with the .trx file extension 36 | 37 | [Tasks] 38 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce 39 | Name: "associate"; Description: "{cm:AskAssociate}"; GroupDescription: "Other tasks"; Flags: checkedonce 40 | 41 | [Files] 42 | Source: "installer\vc_redist.x86.exe"; DestDir: "{tmp}"; Flags: nocompression createallsubdirs recursesubdirs deleteafterinstall 43 | Source: "src\TraceX\bin\Release\TraceX.exe"; DestDir: "{app}"; DestName: "TraceX.exe"; Flags: ignoreversion 44 | Source: "src\TraceX\bin\Release\TraceX.application"; DestDir: "{app}"; Flags: ignoreversion 45 | Source: "src\TraceX\bin\Release\TraceX.exe.config"; DestDir: "{app}"; Flags: ignoreversion 46 | Source: "src\TraceX\bin\Release\TraceX.exe.manifest"; DestDir: "{app}"; Flags: ignoreversion 47 | Source: "src\TraceX.ico"; DestDir: "{app}"; Flags: ignoreversion 48 | Source: "src\TraceX\bin\Release\ELTMLanaged.dll"; DestDir: "{app}"; Flags: ignoreversion 49 | Source: "src\TraceX\bin\Release\AzureRTOS.TraceLibrary.dll"; DestDir: "{app}"; Flags: ignoreversion 50 | Source: "src\MsixPackageProject\CustomEvents\tracex_custom.trxc"; DestDir: "{app}/CustomEvents"; Flags: ignoreversion 51 | Source: "src\MsixPackageProject\TraceFiles\demo_filex.trx"; DestDir: "{app}/TraceFiles"; Flags: ignoreversion 52 | Source: "src\MsixPackageProject\TraceFiles\demo_netx_tcp.trx"; DestDir: "{app}/TraceFiles"; Flags: ignoreversion 53 | Source: "src\MsixPackageProject\TraceFiles\demo_netx_udp.trx"; DestDir: "{app}/TraceFiles"; Flags: ignoreversion 54 | Source: "src\MsixPackageProject\TraceFiles\demo_threadx.trx"; DestDir: "{app}/TraceFiles"; Flags: ignoreversion 55 | 56 | [Icons] 57 | Name: "{group}\TraceX 6.4\TraceX"; Filename: "{app}\TraceX.exe" 58 | Name: "{group}\TraceX 6.4\TraceX User's Guide"; Filename: "https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/tracex/overview-tracex.md" 59 | Name: "{group}\TraceX 6.4\{cm:UninstallProgram,TraceX}"; Filename: "{uninstallexe}" 60 | Name: "{commondesktop}\TraceX 6.4.1.0"; Filename: "{app}\TraceX.exe"; Tasks: desktopicon 61 | 62 | [Registry] 63 | Root: HKCR; Subkey: ".trx"; ValueType: string; ValueName: ""; ValueData: "TraceX Data File"; Flags: uninsdeletevalue; Tasks: associate 64 | Root: HKCR; Subkey: "TraceX_Data_File\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\TraceX.exe,0"; Tasks: associate 65 | Root: HKCR; Subkey: "TraceX_Data_File\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\TraceX.exe"" ""%1"""; Tasks: associate 66 | 67 | Root: HKLM; Subkey: "Software\Eclipse Foundation\TraceX\InstallDir"; ValueType: string; ValueName: ""; ValueData: "{app}"; 68 | 69 | [Run] 70 | ; Filename: "{app}\TraceX.exe"; Description: "{cm:LaunchProgram,TraceX}"; Flags: nowait postinstall skipifsilent 71 | Filename: "{tmp}\vc_redist.x86.exe"; StatusMsg: "Installing Visual C++ 2015-2019 Redistributable(x86)"; Parameters:"/passive /norestart" 72 | 73 | -------------------------------------------------------------------------------- /scripts/build_tracex.cmd: -------------------------------------------------------------------------------- 1 | rem Initialize the developer environment just like a developer box. Note that 'call' keyword that ensures that the script does not exist after 2 | rem calling the other batch file. 3 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.16299.0 4 | 5 | rem Set Python path 6 | SET PATH=%PATH%;"C:\Program Files\Python36";"C:\Program Files\Python36\scripts" 7 | 8 | rem Save working directory so that we can restore it back after building everything. This will make developers happy and then 9 | rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different. 10 | pushd "%~dp0" 11 | 12 | cd ..\src 13 | msbuild TraceX.sln /p:Configuration=Release 14 | 15 | exit /B %ERRORLEVEL% 16 | -------------------------------------------------------------------------------- /scripts/build_tracex_msix_package.cmd: -------------------------------------------------------------------------------- 1 | rem Initialize the developer environment just like a developer box. Note that 'call' keyword that ensures that the script does not exist after 2 | rem calling the other batch file. 3 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.16299.0 4 | 5 | rem Save working directory so that we can restore it back after building everything. This will make developers happy and then 6 | rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different. 7 | pushd "%~dp0" 8 | 9 | cd ..\src 10 | msbuild MsixPackageProject\MsixPackageProject.sln /p:Configuration=Release /p:UapAppxPackageBuildMode=CI /p:GenerateAppInstallerFile=false /p:Platform=x86 11 | 12 | exit /B %ERRORLEVEL% 13 | -------------------------------------------------------------------------------- /scripts/download_vc_redist.cmd: -------------------------------------------------------------------------------- 1 | rem Save working directory so that we can restore it back after building everything. This will make developers happy and then 2 | rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different. 3 | pushd "%~dp0" 4 | 5 | "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File download_vc_redist.ps1 6 | 7 | exit /B %ERRORLEVEL% -------------------------------------------------------------------------------- /scripts/download_vc_redist.ps1: -------------------------------------------------------------------------------- 1 | cd ../installer 2 | Invoke-WebRequest https://aka.ms/vs/16/release/vc_redist.x86.exe -O vc_redist.x86.exe 3 | dir -------------------------------------------------------------------------------- /scripts/generate_tracex_installer.cmd: -------------------------------------------------------------------------------- 1 | rem Save working directory so that we can restore it back after building everything. This will make developers happy and then 2 | rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different. 3 | pushd "%~dp0" 4 | 5 | cd ..\installer 6 | 7 | rem generate studio installer 8 | "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q "tracex_installer_release.iss" 9 | 10 | exit /B %ERRORLEVEL% -------------------------------------------------------------------------------- /scripts/install_inno_setup.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = "Stop" 2 | 3 | if (Test-Path "$PSScriptRoot\win-installer-helper.psm1") 4 | { 5 | Import-Module "$PSScriptRoot\win-installer-helper.psm1" 6 | } 7 | elseif (Test-Path "C:\win-installer-helper.psm1") 8 | { 9 | Import-Module "C:\win-installer-helper.psm1" 10 | } 11 | 12 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 13 | 14 | Start-Setup 15 | 16 | try { 17 | 18 | 19 | Get-File -Url "http://www.jrsoftware.org/download.php/is.exe" -fileName "innosetup-6.0.3.exe" 20 | Install-FromExe -Path "C:\Downloads\innosetup-6.0.3.exe" -Arguments "/VERYSILENT /SUPPRESSMSGBOXES" 21 | } 22 | catch 23 | { 24 | $_.Exception | Format-List 25 | exit -1 26 | } 27 | finally 28 | { 29 | Stop-Setup 30 | } 31 | -------------------------------------------------------------------------------- /scripts/run-pwsh.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal EnableDelayedExpansion 3 | setlocal EnableExtensions 4 | "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File "%1" 5 | exit /B %ERRORLEVEL% -------------------------------------------------------------------------------- /src/CodeMaid.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | True 12 | 13 | 14 | True 15 | 16 | 17 | True 18 | 19 | 20 | 120 21 | 22 | 23 | False 24 | 25 | 26 | 27 | 28 | 29 | 30 | True 31 | 32 | 33 | 1 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/ELTMLManaged/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | using namespace System; 4 | using namespace System::Reflection; 5 | using namespace System::Runtime::CompilerServices; 6 | using namespace System::Runtime::InteropServices; 7 | using namespace System::Security::Permissions; 8 | 9 | // 10 | // General Information about an assembly is controlled through the following 11 | // set of attributes. Change these attribute values to modify the information 12 | // associated with an assembly. 13 | // 14 | [assembly:AssemblyTitleAttribute("ELTMLManaged")]; 15 | [assembly:AssemblyDescriptionAttribute("")]; 16 | [assembly:AssemblyConfigurationAttribute("")]; 17 | [assembly:AssemblyCompanyAttribute("Toshiba")]; 18 | [assembly:AssemblyProductAttribute("ELTMLManaged")]; 19 | [assembly:AssemblyCopyrightAttribute("Copyright (c) Toshiba 2008")]; 20 | [assembly:AssemblyTrademarkAttribute("")]; 21 | [assembly:AssemblyCultureAttribute("")]; 22 | 23 | // 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the value or you can default the Revision and Build Numbers 32 | // by using the '*' as shown below: 33 | 34 | [assembly:AssemblyVersionAttribute("1.0.*")]; 35 | 36 | [assembly:ComVisible(false)]; 37 | 38 | [assembly:CLSCompliantAttribute(true)]; 39 | 40 | [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; 41 | -------------------------------------------------------------------------------- /src/ELTMLManaged/ELTMLManaged.h: -------------------------------------------------------------------------------- 1 | // ELTMLManaged.h 2 | 3 | #pragma once 4 | 5 | using namespace System; 6 | using namespace System::Collections::Generic; 7 | using namespace AzureRTOS::Tml; 8 | 9 | #include "stdio.h" 10 | #include "tml_library.h" 11 | 12 | namespace ELTMLManaged 13 | { 14 | public ref class TMLFunctions 15 | { 16 | public: 17 | static TmlHeaderInfo^ HeaderInfo; 18 | static TmlPerformance^ Performance; 19 | static TmlPerformanceNx^ PerformanceNx; 20 | static TmlPerformanceFx^ PerformanceFx; 21 | static TmlThreadPerformance^ ThreadPerformance; 22 | static TmlInterruptIdle^ InterruptIdle; 23 | static String^ ErrorMessage; 24 | 25 | static bool ExtractTraceInfo(String^ file_name, TmlTrace^ tmlTrace, List^ threads, List^ objects, List^ events); 26 | 27 | static bool RawTraceFileDump(String^ file_name, String^ tracex_version, String^ input_file_name, String^ dump_file_name); 28 | 29 | static void Uninitialize(); 30 | 31 | static void ThreadExecutionStatus(unsigned long thread_index, unsigned long starting_event, unsigned long ending_event, List^ executionStatusList, unsigned long max_status_pairs); 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /src/ELTMLManaged/ELTMLManaged.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 31 | 34 | 37 | 40 | 43 | 46 | 55 | 58 | 61 | 64 | 72 | 75 | 78 | 81 | 84 | 87 | 90 | 93 | 94 | 103 | 106 | 109 | 112 | 115 | 118 | 126 | 129 | 132 | 135 | 142 | 145 | 148 | 151 | 154 | 157 | 160 | 163 | 164 | 165 | 166 | 171 | 176 | 181 | 186 | 190 | 191 | 192 | 197 | 200 | 201 | 204 | 205 | 208 | 211 | 215 | 216 | 219 | 223 | 224 | 225 | 228 | 229 | 230 | 235 | 238 | 239 | 242 | 243 | 246 | 247 | 250 | 251 | 252 | 257 | 260 | 261 | 264 | 265 | 266 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /src/ELTMLManaged/ELTMLManaged.vcproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "relative:ELTMLManaged" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/ELTMLManaged/ELTMLManaged.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | ELTMLanaged 15 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42} 16 | ELTMLManaged 17 | SAK 18 | SAK 19 | SAK 20 | SAK 21 | ManagedCProj 22 | v4.7.2 23 | 10.0 24 | 25 | 26 | 27 | DynamicLibrary 28 | v142 29 | Unicode 30 | true 31 | true 32 | 33 | 34 | DynamicLibrary 35 | v142 36 | Unicode 37 | true 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | <_ProjectFileVersion>16.0.29403.142 51 | 52 | 53 | $(ProjectDir)..\$(Configuration)\ 54 | $(Configuration)\ 55 | true 56 | 57 | 58 | $(ProjectDir)..\$(Configuration)\ 59 | $(Configuration)\ 60 | false 61 | 62 | 63 | 64 | Disabled 65 | WIN32;_DEBUG;%(PreprocessorDefinitions) 66 | MultiThreadedDebugDLL 67 | Use 68 | Level3 69 | ProgramDatabase 70 | 71 | 72 | 73 | true 74 | true 75 | MachineX86 76 | 77 | 78 | 79 | 80 | WIN32;NDEBUG;%(PreprocessorDefinitions) 81 | MultiThreadedDLL 82 | Use 83 | Level3 84 | ProgramDatabase 85 | 86 | 87 | 88 | true 89 | MachineX86 90 | 91 | 92 | 93 | 94 | true 95 | true 96 | 97 | 98 | true 99 | true 100 | 101 | 102 | true 103 | true 104 | 105 | 106 | true 107 | true 108 | 109 | 110 | 111 | 112 | {4e9354d1-0580-436b-b3d9-b7e588367804} 113 | true 114 | true 115 | 116 | 117 | 118 | 119 | 120 | 121 | Create 122 | Create 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /src/ELTMLManaged/README.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : ELTMLManaged Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this ELTMLManaged DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your ELTMLManaged application. 9 | 10 | ELTMLManaged.vcproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | ELTMLManaged.cpp 17 | This is the main DLL source file. 18 | 19 | ELTMLManaged.h 20 | This file contains a class declaration. 21 | 22 | AssemblyInfo.cpp 23 | Contains custom attributes for modifying assembly metadata. 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | Other notes: 27 | 28 | AppWizard uses "TODO:" to indicate parts of the source code you 29 | should add to or customize. 30 | 31 | ///////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /src/ELTMLManaged/Stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ELTMLManaged.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /src/ELTMLManaged/Stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, 3 | // but are changed infrequently 4 | 5 | #pragma once 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/ELTMLManaged/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/ELTMLManaged/app.ico -------------------------------------------------------------------------------- /src/ELTMLManaged/app.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | 7 | ///////////////////////////////////////////////////////////////////////////// 8 | #undef APSTUDIO_READONLY_SYMBOLS 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // English (U.S.) resources 12 | 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // 16 | // Icon 17 | // 18 | 19 | // Icon placed first or with lowest ID value becomes application icon 20 | 21 | LANGUAGE 4, 2 22 | #pragma code_page(936) 23 | 1 ICON "app.ico" 24 | 25 | #ifdef APSTUDIO_INVOKED 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // 28 | // TEXTINCLUDE 29 | // 30 | 31 | 1 TEXTINCLUDE 32 | BEGIN 33 | "resource.h\0" 34 | "\0" 35 | END 36 | 37 | 2 TEXTINCLUDE 38 | BEGIN 39 | "#include ""afxres.h""\r\n" 40 | "\0" 41 | END 42 | 43 | 3 TEXTINCLUDE 44 | BEGIN 45 | "\0" 46 | END 47 | 48 | #endif // APSTUDIO_INVOKED 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | 52 | 53 | 54 | #ifndef APSTUDIO_INVOKED 55 | ///////////////////////////////////////////////////////////////////////////// 56 | // 57 | // Generated from the TEXTINCLUDE 3 resource. 58 | // 59 | 60 | 61 | ///////////////////////////////////////////////////////////////////////////// 62 | #endif // not APSTUDIO_INVOKED 63 | 64 | -------------------------------------------------------------------------------- /src/ELTMLManaged/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by app.rc 4 | -------------------------------------------------------------------------------- /src/MsixPackageProject/CustomEvents/tracex_custom.trxc: -------------------------------------------------------------------------------- 1 | //Custom event icon definitions 2 | //Events from 4096 through 65535 3 | //Format: event-number, event-name, 2-letter-abbreviation, RGB-color-top, RGB-color-bottom, info1-lable, info2-lable, info3-lable, info4-lable 4 | Start 5 | End -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/LargeTile.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/LargeTile.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/LargeTile.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/LargeTile.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SmallTile.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SmallTile.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SmallTile.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SmallTile.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SmallTile.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.backup.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/TraceX-icon-8-20-2020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/TraceX-icon-8-20-2020.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Images/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/Images/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /src/MsixPackageProject/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 10 | 11 | 15 | 16 | 17 | Eclipse ThreadX TraceX 18 | Eclipse Foundation 19 | Images\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | .trx 52 | 53 | TraceX Trace File 54 | TraceX-icon-8-20-2020.png 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/MsixPackageProject/README.txt: -------------------------------------------------------------------------------- 1 | The app packaging project can be used to generate the required app package upload file (.msixupload or .appxupload) for Windows Store Submission. 2 | 3 | To generate the TraceX package upload file, run "build_tracex_msix_package.cmd" from "scripts" folder. 4 | 5 | Additional Resources: 6 | For more in-depth information on packaging UWP apps for Windows Store Submission, refer to Microsoft's official documentation at: 7 | https://learn.microsoft.com/en-us/windows/msix/package/packaging-uwp-apps -------------------------------------------------------------------------------- /src/MsixPackageProject/TraceFiles/demo_filex.trx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/TraceFiles/demo_filex.trx -------------------------------------------------------------------------------- /src/MsixPackageProject/TraceFiles/demo_netx_tcp.trx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/TraceFiles/demo_netx_tcp.trx -------------------------------------------------------------------------------- /src/MsixPackageProject/TraceFiles/demo_netx_udp.trx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/TraceFiles/demo_netx_udp.trx -------------------------------------------------------------------------------- /src/MsixPackageProject/TraceFiles/demo_threadx.trx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/MsixPackageProject/TraceFiles/demo_threadx.trx -------------------------------------------------------------------------------- /src/README.txt: -------------------------------------------------------------------------------- 1 | Follow these steps to build and run TraceX: 2 | 1. Open TraceX.sln file using Visual Studio. Please note that a minimum version of Visual Studio 2019 is required. 3 | 2. Set the TraceX project as the startup project. 4 | 3. Build the project. Once completed, you are ready to run or debug the project. -------------------------------------------------------------------------------- /src/TraceLibraryInterop/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Trace Management Library")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Trace Management Library")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft, 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0581f45b-07b3-4ea6-a0d5-012af8677ef8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/TraceLibraryInterop/TMLFunctions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace AzureRTOS.Tml 5 | { 6 | public class TmlFunctions 7 | { 8 | // To reduce security risk, marshal parameter 'fileName' as Unicode, 9 | // by setting DllImport.CharSet to CharSet.Unicode, or by explicitly marshaling the parameter as 10 | // UnmanagedType.LPWStr.If you need to marshal this string as ANSI or system-dependent, 11 | // set BestFitMapping = false; for added security, also set ThrowOnUnmappableChar= true. 12 | [DllImport("CRTDll.dll", EntryPoint = "fopen", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] 13 | internal static extern IntPtr FileOpen(string fileName, string mode); 14 | 15 | [DllImport("CRTDll.dll", EntryPoint = "fclose", CallingConvention = CallingConvention.Cdecl)] 16 | internal static extern void FileClose(IntPtr handle); 17 | 18 | [DllImport("ELTMLibrary.dll", EntryPoint = "extract_trace_info", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] 19 | internal static extern int ExtractTraceInfo( 20 | // [MarshalAs(UnmanagedType.LPStr)] string fileName, 21 | // [MarshalAs(UnmanagedType.AnsiBStr)] string fileName, 22 | string fileName, 23 | // [MarshalAs(UnmanagedType.LPStruct)] ref TmlTrace trace 24 | ref TmlTrace trace); 25 | 26 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_raw_trace_file_dump", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] 27 | internal static extern bool RawTraceFileDump( 28 | // [MarshalAs(UnmanagedType.LPStr)] string fileName, 29 | // [MarshalAs(UnmanagedType.AnsiBStr)] string fileName, 30 | string fileName); 31 | 32 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_thread_execution_status_get", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 33 | internal static extern int ThreadExecutionStatus( 34 | //[MarshalAs(UnmanagedType.SysInt)] IntPtr sourceTraceFile, 35 | ulong threadIndex); 36 | 37 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_initialize", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 38 | internal static extern int Initialize( 39 | // [MarshalAs(UnmanagedType.SysInt)] IntPtr sourceTraceFile, 40 | IntPtr sourceTraceFile, 41 | out uint totalThreads, 42 | out uint totalObjects, 43 | out uint totalEvents, 44 | out long maxRelativeTicks); 45 | 46 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_uninitialize", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 47 | internal static extern void Uninitialize(); 48 | 49 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_header_info_get", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 50 | internal static extern int GetHeaderInfo( 51 | out uint header_trace_id, 52 | out uint header_timer_valid_mask, 53 | out uint header_trace_base_address, 54 | out uint header_object_registry_start_address, 55 | out ushort header_reserved1, 56 | out ushort header_object_name_size, 57 | out uint header_object_registry_end_address, 58 | out uint header_trace_buffer_start_address, 59 | out uint header_trace_buffer_end_address, 60 | out uint header_trace_buffer_current_address, 61 | out uint header_reserved2, 62 | out uint header_reserved3, 63 | out uint header_reserved4); 64 | 65 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_object_get", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] 66 | internal static extern int GetObject( 67 | uint object_index, 68 | out string object_name, 69 | out uint object_address, 70 | out uint parameter_1, 71 | out uint parameter_2); 72 | 73 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_object_thread_get", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] 74 | internal static extern int GetObjectThread( 75 | uint thread_index, 76 | out string object_name, 77 | out uint object_address, 78 | out uint parameter_1, 79 | out uint parameter_2); 80 | 81 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_object_by_address_find", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 82 | internal static extern int FindObjectByAddress( 83 | uint object_address, 84 | out uint object_index); 85 | 86 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_event_get", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 87 | internal static extern int GetEvent( 88 | uint event_index, 89 | out uint event_context, 90 | out uint event_id, 91 | out uint event_thread_priority, 92 | out uint event_time_stamp, 93 | out uint event_info_1, 94 | out uint event_info_2, 95 | out uint event_info_3, 96 | out uint event_info_4, 97 | out long event_relative_ticks); 98 | 99 | [DllImport("ELTMLibrary.dll", EntryPoint = "tml_event_by_relative_ticks_find", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] 100 | internal static extern int FindEventByRelativeTicks( 101 | long relative_ticks_start, 102 | long relative_ticks_end, 103 | out int event_index); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/TraceLibraryInterop/TraceLibraryInterop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.21022 7 | 2.0 8 | {4E9354D1-0580-436B-B3D9-B7E588367804} 9 | Library 10 | Properties 11 | AzureRTOS.Tml 12 | AzureRTOS.TraceLibrary 13 | v4.7.2 14 | 512 15 | SAK 16 | SAK 17 | SAK 18 | SAK 19 | 20 | 21 | 22 | 23 | 3.5 24 | 25 | 26 | 27 | true 28 | full 29 | false 30 | bin\Debug\ 31 | DEBUG;TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | pdbonly 38 | true 39 | bin\Release\ 40 | TRACE 41 | prompt 42 | 4 43 | x86 44 | false 45 | 46 | 47 | 48 | 49 | 50 | 3.5 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /src/TraceLibraryInterop/TraceLibraryInterop.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "relative:TraceLibraryInterop" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/TraceX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX.ico -------------------------------------------------------------------------------- /src/TraceX.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29411.108 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceX", "TraceX\TraceX.csproj", "{E6E35589-797E-4C15-A8FB-1602FC1B84C8}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceLibraryInterop", "TraceLibraryInterop\TraceLibraryInterop.csproj", "{4E9354D1-0580-436B-B3D9-B7E588367804}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ELTMLanaged", "ELTMLManaged\ELTMLManaged.vcxproj", "{16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}" 11 | EndProject 12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E0EC7705-744F-41CB-8A24-5AE36BC86C1A}" 13 | ProjectSection(SolutionItems) = preProject 14 | .editorconfig = .editorconfig 15 | EndProjectSection 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Debug|Any CPU = Debug|Any CPU 20 | Debug|Mixed Platforms = Debug|Mixed Platforms 21 | Debug|Win32 = Debug|Win32 22 | Release|Any CPU = Release|Any CPU 23 | Release|Mixed Platforms = Release|Mixed Platforms 24 | Release|Win32 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 27 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 30 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 31 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Win32.ActiveCfg = Debug|Any CPU 32 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Debug|Win32.Build.0 = Debug|Any CPU 33 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Any CPU.Build.0 = Release|Any CPU 35 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 36 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU 37 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Win32.ActiveCfg = Release|Any CPU 38 | {E6E35589-797E-4C15-A8FB-1602FC1B84C8}.Release|Win32.Build.0 = Release|Any CPU 39 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 40 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Any CPU.Build.0 = Debug|Any CPU 41 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 42 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 43 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Win32.ActiveCfg = Debug|Any CPU 44 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Debug|Win32.Build.0 = Debug|Any CPU 45 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Any CPU.ActiveCfg = Release|Any CPU 46 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Any CPU.Build.0 = Release|Any CPU 47 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 48 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Mixed Platforms.Build.0 = Release|Any CPU 49 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Win32.ActiveCfg = Release|Any CPU 50 | {4E9354D1-0580-436B-B3D9-B7E588367804}.Release|Win32.Build.0 = Release|Any CPU 51 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Debug|Any CPU.ActiveCfg = Debug|Win32 52 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 53 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Debug|Mixed Platforms.Build.0 = Debug|Win32 54 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Debug|Win32.ActiveCfg = Debug|Win32 55 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Debug|Win32.Build.0 = Debug|Win32 56 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Release|Any CPU.ActiveCfg = Release|Win32 57 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Release|Mixed Platforms.ActiveCfg = Release|Win32 58 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Release|Mixed Platforms.Build.0 = Release|Win32 59 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Release|Win32.ActiveCfg = Release|Win32 60 | {16FE35B1-A8A0-4CCC-8EC3-E24F29EA3E42}.Release|Win32.Build.0 = Release|Win32 61 | EndGlobalSection 62 | GlobalSection(SolutionProperties) = preSolution 63 | HideSolutionNode = FALSE 64 | EndGlobalSection 65 | GlobalSection(ExtensibilityGlobals) = postSolution 66 | SolutionGuid = {FF7DF359-806B-4ABD-86F8-2AB263AA29EA} 67 | EndGlobalSection 68 | EndGlobal 69 | -------------------------------------------------------------------------------- /src/TraceX.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX.suo -------------------------------------------------------------------------------- /src/TraceX/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 23 | 28 | 29 | 32 | 33 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/TraceX/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text.RegularExpressions; 8 | using System.Windows; 9 | 10 | 11 | namespace AzureRTOS.TraceManagement 12 | { 13 | /// 14 | /// Interaction logic for App.xaml 15 | /// 16 | public partial class App : Application 17 | { 18 | // Indexed command line args using hash table 19 | //public static Hashtable CommandLineArgs = new Hashtable(); 20 | public static string TraceFile = string.Empty; 21 | public static bool HasOpenFile = false; 22 | 23 | private void AppStartup(object sender, StartupEventArgs e) 24 | { 25 | // Don't bother if no command line args were passed 26 | // NOTE: e.Args is never null - if no command line args were passed, 27 | // the length of e.Args is 0. 28 | if (e.Args.Length == 0) return; 29 | 30 | TraceFile = e.Args[0]; 31 | if (TraceFile.IndexOf(":\\", StringComparison.Ordinal) == -1) 32 | { 33 | TraceFile = System.IO.Path.GetDirectoryName(Application.ResourceAssembly.Location) + "\\" + e.Args[0]; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/TraceX/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ACAAEAAgABAAAAAAAAAFAAQAAAAEAABIAAAACAAAQAA= 7 | Code\ThreadStackUsageItem.cs 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/TraceX/Code/IDetailsWindowManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ExpressLogic.TraceManagement.Code 7 | { 8 | public interface IDetailsWindowManager 9 | { 10 | void RemoveDetailsWindow(Components.DetailsWindow detailsWindow); 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/TraceX/Code/IEventIndicator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ExpressLogic.TraceManagement.Code 7 | { 8 | public interface IEventIndicator 9 | { 10 | void MoveToEvent(int eventIndex, bool userEntry); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/TraceX/Code/Indicator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace AzureRTOS.TraceManagement.Code 16 | { 17 | public class Indicator 18 | { 19 | Canvas headCanvas; 20 | Canvas tailCanvas; 21 | 22 | Indicator() { } 23 | 24 | Canvas headPart; 25 | Canvas tailPart; 26 | 27 | private Rectangle rectTail; 28 | 29 | public static Indicator Create(Canvas headCanvas,Canvas tailCanvas) 30 | { 31 | Indicator obj = new Indicator(); 32 | obj.headCanvas = headCanvas; 33 | obj.tailCanvas = tailCanvas; 34 | obj.Init(); 35 | return obj; 36 | } 37 | public void Show(double left) 38 | { 39 | Canvas.SetLeft(this.headPart, left); 40 | Canvas.SetLeft(this.tailPart, left); 41 | if (null != rectTail) rectTail.Height = this.tailCanvas.ActualHeight+3000; 42 | 43 | } 44 | 45 | public void AddToCanvas() 46 | { 47 | this.headCanvas.Children.Add(this.headPart); 48 | this.tailCanvas.Children.Add(this.tailPart); 49 | } 50 | 51 | 52 | private void Init() 53 | { 54 | this.headPart = new Canvas(); 55 | 56 | Rectangle rectHead = new Rectangle(); 57 | this.headPart.Children.Add(rectHead); 58 | Canvas.SetLeft(rectHead, 0); 59 | rectHead.Width = 2; 60 | rectHead.Fill = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)); 61 | rectHead.Fill.Opacity = 0.5; 62 | rectHead.Height = 100; 63 | 64 | 65 | Polygon triangle = new Polygon(); 66 | triangle.Points = new PointCollection(3); 67 | triangle.Points.Add(new Point(-3, 0)); 68 | triangle.Points.Add(new Point(5, 0)); 69 | triangle.Points.Add(new Point(1, 4)); 70 | triangle.Fill = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0)); 71 | this.headPart.Children.Add(triangle); 72 | 73 | 74 | Canvas.SetZIndex(this.headPart, 10000); 75 | Canvas.SetLeft(this.headPart, -100); 76 | 77 | 78 | this.tailPart = new Canvas(); 79 | this.rectTail = new Rectangle(); 80 | this.tailPart.Children.Add(rectTail); 81 | Canvas.SetLeft(rectTail, 0); 82 | rectTail.Width = 2; 83 | rectTail.Fill = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)); 84 | rectTail.Fill.Opacity = 0.5; 85 | rectTail.Height = 3000; //tailCanvas.Height; 86 | 87 | 88 | Canvas.SetZIndex(this.tailPart, 1); 89 | Canvas.SetLeft(this.tailPart, -100); 90 | } 91 | } 92 | 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/TraceX/Code/Information.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AzureRTOS.TraceManagement.Code 7 | { 8 | public class Information 9 | { 10 | string caption; 11 | string description; 12 | string value; 13 | 14 | public Information(string caption, string value) 15 | : this(caption, value, string.Empty) 16 | { 17 | } 18 | public Information(string caption, string value, string description) 19 | { 20 | this.caption = caption; 21 | this.value = value; 22 | this.description = description; 23 | } 24 | 25 | public String Caption 26 | { 27 | get { return caption; } 28 | } 29 | public String Description 30 | { 31 | get { return this.description; } 32 | } 33 | public String Value 34 | { 35 | get { return this.value; } 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/TraceX/Code/NavEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AzureRTOS.TraceManagement.Code 7 | { 8 | public class IndexEventArgs:System.EventArgs 9 | { 10 | bool centerMarker = false; 11 | int index; 12 | public IndexEventArgs(int index) 13 | { 14 | this.index = index; 15 | } 16 | 17 | public IndexEventArgs(int index, bool centerMarker) 18 | { 19 | this.index = index; 20 | this.centerMarker = centerMarker; 21 | } 22 | 23 | public int Index 24 | { 25 | get { return this.index; } 26 | } 27 | 28 | public bool CenterMarker 29 | { 30 | get { return this.centerMarker; } 31 | } 32 | 33 | } 34 | 35 | public enum Direction 36 | { 37 | Up = 0, 38 | Down, 39 | Left, 40 | Right 41 | } 42 | 43 | public class PageEventArgs : System.EventArgs 44 | { 45 | int index = 0 ; 46 | Direction pageDirection; 47 | public PageEventArgs(Direction pageDirection) 48 | { 49 | this.pageDirection = pageDirection; 50 | } 51 | public Direction PageDirection 52 | { 53 | get { return this.pageDirection; } 54 | } 55 | public int Index 56 | { 57 | get { return this.index; } 58 | set { this.index = value; } 59 | } 60 | } 61 | 62 | public class contextEventArgs : System.Windows.RoutedEventArgs 63 | { 64 | 65 | string name; 66 | int address; 67 | 68 | public contextEventArgs(string name, int address) 69 | { 70 | this.name = name; 71 | this.address = address; 72 | } 73 | 74 | public string Name 75 | { 76 | get { return name; } 77 | } 78 | 79 | public int Address 80 | { 81 | get { return address; } 82 | } 83 | } 84 | 85 | // ZoomEventArgs 86 | public class ZoomEventArgs : EventArgs 87 | { 88 | bool enableZoomOut = false; 89 | bool enableZoomIn = false; 90 | double multiple = 1.0; 91 | 92 | public ZoomEventArgs(bool enableZoomOut, bool enableZoomIn) 93 | { 94 | this.enableZoomOut = enableZoomOut; 95 | this.enableZoomIn = enableZoomIn; 96 | } 97 | 98 | public ZoomEventArgs(double multiple) 99 | { 100 | this.multiple = multiple; 101 | } 102 | 103 | public double Multiple 104 | { 105 | get { return multiple; } 106 | } 107 | 108 | public bool EnableZoomOut 109 | { 110 | get { return enableZoomOut; } 111 | 112 | } 113 | 114 | public bool EnableZoomIn 115 | { 116 | get { return enableZoomIn; } 117 | } 118 | } 119 | 120 | public class DeltaEventArgs : EventArgs 121 | { 122 | long delta; 123 | double relativeTime; 124 | long unitsIndex; 125 | 126 | public DeltaEventArgs(long delta, long unitsIndex, double relativeTime) 127 | { 128 | this.delta = delta; 129 | this.unitsIndex = unitsIndex; 130 | this.relativeTime = relativeTime; 131 | } 132 | 133 | public long DeltaTicks 134 | { 135 | get { return delta; } 136 | } 137 | 138 | public double RelativeTime 139 | { 140 | get { return relativeTime; } 141 | } 142 | 143 | public long UnitsIndex 144 | { 145 | get { 146 | //long deltaScale = 0; 147 | //Int64.TryParse(scale, out deltaScale); 148 | return unitsIndex; 149 | } 150 | } 151 | 152 | 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /src/TraceX/Code/PopServItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace AzureRTOS.TraceManagement.Code 8 | { 9 | public class PopServItem 10 | { 11 | string name; 12 | string stringcount; 13 | 14 | public string Name 15 | { 16 | get 17 | { 18 | return name; 19 | } 20 | set { name = value; } 21 | } 22 | 23 | long count; 24 | 25 | public long Count 26 | { 27 | get { return count; } 28 | set { count = value; } 29 | } 30 | 31 | public string stringCount 32 | { 33 | get 34 | { 35 | return stringcount; 36 | } 37 | set { stringcount = value; } 38 | } 39 | double percent; 40 | 41 | public double Percent 42 | { 43 | get { return percent; } 44 | set { percent = value; } 45 | } 46 | public double Percent100 47 | { 48 | get { return percent * 100; } 49 | } 50 | public string PercentString 51 | { 52 | get 53 | { 54 | return (percent).ToString("0.##%", CultureInfo.InvariantCulture); 55 | } 56 | } 57 | 58 | public override string ToString() 59 | { 60 | return $"Thread Id: {Name}, Percent Usage: {percent}"; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/TraceX/Code/PopServItemTypeListViewItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AzureRTOS.TraceManagement.Code 8 | { 9 | class PopServItemTypeListViewItem 10 | { 11 | public PopServItem Content { get; set; } 12 | public override string ToString() 13 | { 14 | //Make the content name as the accessible name 15 | return ("Context: " + Content.Name + "Usage Graph: " + Content.Percent.ToString("P2")); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TraceX/Code/ThreadStackUsageItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace AzureRTOS.TraceManagement.Code 8 | { 9 | public class ThreadStackUsageItem 10 | { 11 | string name; 12 | 13 | public string Name 14 | { 15 | get { return name; } 16 | set { name = value; } 17 | } 18 | 19 | uint stacksize; 20 | public uint StackSize 21 | { 22 | get {return stacksize;} 23 | set { stacksize = value; } 24 | } 25 | 26 | uint minAvailability; 27 | 28 | public uint Availability 29 | { 30 | get {return minAvailability;} 31 | set { minAvailability = value; } 32 | } 33 | 34 | double percent; 35 | 36 | public double Percent 37 | { 38 | get { return percent; } 39 | set { percent = value; } 40 | } 41 | public double Percent100 42 | { 43 | get { return percent * 100; } 44 | } 45 | public string PercentString 46 | { 47 | get 48 | { 49 | return (percent).ToString("0.##%", CultureInfo.InvariantCulture); 50 | } 51 | } 52 | uint EventID; 53 | 54 | public uint eventID 55 | { 56 | get { return EventID; } 57 | set { EventID = value; } 58 | } 59 | 60 | public string eventIDString 61 | { 62 | get 63 | { 64 | if (EventID != 0) 65 | return EventID.ToString(CultureInfo.InvariantCulture); 66 | 67 | return "None"; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/TraceX/Code/ThreadStackUsageItemTypeListViewItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AzureRTOS.TraceManagement.Code 8 | { 9 | class ThreadStackUsageItemTypeListViewItem 10 | { 11 | public ThreadStackUsageItem Content { get; set; } 12 | public override string ToString() 13 | { 14 | //Make the content name as the accessible name 15 | return ("Thread Name: " + Content.Name + ". Stack Size: " + Content.StackSize + ". Availability: " + Content.Availability + ". Usage Graph: " + Content.Percent.ToString("P2") + ". Event Id: " + Content.eventID); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TraceX/Code/TraceViewConstant.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AzureRTOS.TraceManagement.Code 7 | { 8 | public class TraceViewConstant 9 | { 10 | public const double EVENT_DISPLAY_WIDTH = 12; 11 | public const double EVENT_DISPLAY_HEIGHT = 24; 12 | public const double MIN_ICON_WIDTH = 1; 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/TraceX/Code/menuInformation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AzureRTOS.TraceManagement.Code 7 | { 8 | public class menuInformation 9 | { 10 | string caption; 11 | string description; 12 | string value; 13 | int index; 14 | 15 | public menuInformation() 16 | { 17 | } 18 | public menuInformation(string caption, string value) 19 | { 20 | } 21 | public menuInformation(string caption, string value, string description, int index) 22 | { 23 | this.caption = caption; 24 | this.value = value; 25 | this.description = description; 26 | this.index = index; 27 | 28 | } 29 | 30 | public String Caption 31 | { 32 | get { return this.caption; } 33 | set { this.caption = value; } 34 | 35 | } 36 | public String Description 37 | { 38 | get { return this.description; } 39 | set { this.description = value; } 40 | } 41 | public String Value 42 | { 43 | get { return this.value; } 44 | set { this.value = value; } 45 | } 46 | 47 | public int Index 48 | { 49 | get { return this.index; } 50 | set { this.index = value; } 51 | } 52 | 53 | 54 | 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/TraceX/Components/DeltaWindow.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/TraceX/Components/DeltaWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using AzureRTOS.Tml; 16 | 17 | namespace AzureRTOS.TraceManagement.Components 18 | { 19 | /// 20 | /// Interaction logic for DetailsWindow.xaml 21 | /// 22 | public partial class DeltaWindow : Window 23 | { 24 | TmlEvent beginEvent; 25 | TmlEvent endEvent; 26 | 27 | public DeltaWindow(TmlEvent bEvent, TmlEvent eEvent) 28 | { 29 | InitializeComponent(); 30 | beginEvent = bEvent; 31 | endEvent = eEvent; 32 | txtTickDiff.Text = "Difference in Relative Ticks: " + (endEvent.RelativeTicks - beginEvent.RelativeTicks).ToString(CultureInfo.CurrentCulture); 33 | txtTimeDiff.Text = "Difference in Timestamps: " + (endEvent.TimeStamp - beginEvent.TimeStamp).ToString(CultureInfo.CurrentCulture); 34 | } 35 | 36 | private void SetPosition(Point pointNew) 37 | { 38 | Canvas.SetLeft(this, pointNew.X); 39 | Canvas.SetTop(this, pointNew.Y); 40 | if (null != this.Tag) 41 | { 42 | if (this.Tag.GetType() == typeof(Line)) 43 | { 44 | Line line = (Line)this.Tag; 45 | line.X2 = pointNew.X + 100; 46 | line.Y2 = pointNew.Y; 47 | } 48 | } 49 | } 50 | 51 | public void MoveX(double delta) 52 | { 53 | double newX = Canvas.GetLeft(this) + delta; 54 | Canvas.SetLeft(this, newX); 55 | if (null != this.Tag) 56 | { 57 | if (this.Tag.GetType() == typeof(Line)) 58 | { 59 | Line line = (Line)this.Tag; 60 | line.X1 += delta; 61 | line.X2 += delta; 62 | } 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/TraceX/Components/DetailsWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 24 | 29 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 74 | 78 | 79 | 81 | 83 | 85 | 87 | 88 | 89 | 90 | 96 | 97 | 29 | 30 | 42 | 43 | 56 | 57 | 91 | 92 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/CurrentEventInfo.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/CurrentEventInfo.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Shapes; 13 | 14 | using AzureRTOS.Tml; 15 | 16 | namespace AzureRTOS.TraceManagement.Dialogs 17 | { 18 | /// 19 | /// Interaction logic for CurrentEventInfo.xaml 20 | /// 21 | public partial class CurrentEventInfo : Window 22 | { 23 | private static CurrentEventInfo currentEventWindow = null; 24 | 25 | public CurrentEventInfo() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | public static Window Show(Code.TraceFileInfo tfi) 31 | { 32 | if (currentEventWindow == null) 33 | { 34 | currentEventWindow = new CurrentEventInfo(); 35 | currentEventWindow.Show(); 36 | } 37 | 38 | currentEventWindow.Update(tfi); 39 | currentEventWindow.Activate(); 40 | return currentEventWindow; 41 | } 42 | 43 | public static bool hasCurrentEventWindow() 44 | { 45 | if (currentEventWindow == null) 46 | { 47 | return false; 48 | } 49 | else 50 | { 51 | return true; 52 | } 53 | } 54 | 55 | protected override void OnClosed(EventArgs e) 56 | { 57 | currentEventWindow = null; 58 | base.OnClosed(e); 59 | } 60 | 61 | public void Update(Code.TraceFileInfo tfi) 62 | { 63 | if (tfi != null) 64 | { 65 | TmlEvent tmlEvent = tfi.Events[tfi.CurrentEventIndex]; 66 | int index = tfi.FindThreadIndex(tmlEvent); 67 | //Code.Event currentEvent = tfi.Events[tfi.CurrentEventIndex]; 68 | String tName = tfi.Threads[index].Name; 69 | Code.Event currentEvent = Code.Event.CreateInstance(tmlEvent, tName, tfi); 70 | txtDetails.Text = currentEvent.GetEventDetailString(tfi); 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/ExecutionProfile.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 64 | 65 | 68 | 69 | 73 | 74 | 78 | 79 | 80 | 83 | 84 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/ExecutionProfile.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Input; 7 | using System.Windows.Automation; 8 | using System.Windows.Automation.Peers; 9 | using System.ComponentModel; 10 | using System.Data; 11 | 12 | namespace AzureRTOS.TraceManagement.Dialogs 13 | { 14 | /// 15 | /// Interaction logic for PopularServices.xaml 16 | /// 17 | public partial class ExecutionProfile : Window 18 | { 19 | private static ExecutionProfile exeProfile = null; 20 | 21 | Code.TraceFileInfo tfi; 22 | ExecutionProfile(Code.TraceFileInfo tfi) 23 | { 24 | this.tfi = tfi; 25 | InitializeComponent(); 26 | this.dictThread = tfi.DictThreadExecution; 27 | FillListView(null, ListSortDirection.Ascending); 28 | } 29 | 30 | private void FillListView(string sortBy, ListSortDirection direction) 31 | { 32 | listView1.Items.Clear(); 33 | long sum = this.tfi.TmlTraceInfo.MaxRelativeTicks; 34 | var result = from pair in dictThread select pair; 35 | 36 | if (!string.IsNullOrEmpty(sortBy)) 37 | { 38 | if (sortBy == "Context") 39 | { 40 | if (direction == ListSortDirection.Ascending) 41 | { 42 | result = from pair in dictThread orderby pair.Key ascending select pair; 43 | } 44 | else 45 | { 46 | result = from pair in dictThread orderby pair.Key descending select pair; 47 | } 48 | } 49 | else 50 | { 51 | if (direction == ListSortDirection.Ascending) 52 | { 53 | result = from pair in dictThread orderby pair.Value ascending select pair; 54 | } 55 | else 56 | { 57 | result = from pair in dictThread orderby pair.Value descending select pair; 58 | } 59 | } 60 | } 61 | 62 | foreach (KeyValuePair pair in result) 63 | { 64 | Code.PopServItem item = new AzureRTOS.TraceManagement.Code.PopServItem(); 65 | item.Name = pair.Key; 66 | item.Count = pair.Value > 0 ? pair.Value : 0; 67 | item.Percent = ((double)item.Count) / sum; 68 | Code.PopServItemTypeListViewItem lvi = new Code.PopServItemTypeListViewItem(); 69 | lvi.Content = item; 70 | 71 | listView1.Items.Add(lvi); 72 | } 73 | } 74 | 75 | Dictionary dictThread; 76 | public static Window Show(Code.TraceFileInfo tfi) 77 | { 78 | if (exeProfile == null) 79 | { 80 | exeProfile = new ExecutionProfile(tfi); 81 | exeProfile.Show(); 82 | } 83 | exeProfile.Activate(); 84 | return exeProfile; 85 | } 86 | 87 | protected override void OnClosed(EventArgs e) 88 | { 89 | exeProfile = null; 90 | base.OnClosed(e); 91 | } 92 | 93 | GridViewColumnHeader _lastHeaderClicked = null; 94 | ListSortDirection _lastDirection = ListSortDirection.Ascending; 95 | 96 | void GridViewColumnHeaderClickedHandler(object sender, 97 | RoutedEventArgs e) 98 | { 99 | OnSort(e.OriginalSource); 100 | } 101 | 102 | private void GridViewColumnHeaderKeyDownHandler(object sender, KeyEventArgs e) 103 | { 104 | if ((e.Key == Key.Space) || (e.Key == Key.Enter)) 105 | { 106 | // Re-sort the ListView as required. 107 | OnSort(e.OriginalSource); 108 | } 109 | } 110 | 111 | private void GridViewColumnHeaderGotFocus(object sender, RoutedEventArgs e) 112 | { 113 | GridViewColumnHeader headerClicked = e.OriginalSource as GridViewColumnHeader; 114 | if (headerClicked != null) 115 | { 116 | headerClicked.Background = System.Windows.Media.Brushes.LightBlue; 117 | headerClicked.Foreground = System.Windows.Media.Brushes.Black; 118 | } 119 | } 120 | 121 | private void GridViewColumnHeaderLostFocus(object sender, RoutedEventArgs e) 122 | { 123 | GridViewColumnHeader headerClicked = e.OriginalSource as GridViewColumnHeader; 124 | if (headerClicked != null) 125 | { 126 | headerClicked.Background = SystemColors.WindowBrush; 127 | headerClicked.Foreground = SystemColors.WindowTextBrush; 128 | } 129 | } 130 | private void OnSort(object originalSource) 131 | { 132 | GridViewColumnHeader headerClicked = originalSource as GridViewColumnHeader; 133 | ListSortDirection direction; 134 | 135 | if (headerClicked != null) 136 | { 137 | if (headerClicked.Role != GridViewColumnHeaderRole.Padding) 138 | { 139 | if (headerClicked != _lastHeaderClicked) 140 | { 141 | direction = ListSortDirection.Ascending; 142 | } 143 | else 144 | { 145 | if (_lastDirection == ListSortDirection.Ascending) 146 | { 147 | direction = ListSortDirection.Descending; 148 | } 149 | else 150 | { 151 | direction = ListSortDirection.Ascending; 152 | } 153 | } 154 | 155 | string header = headerClicked.Column.Header as string; 156 | Sort(header, direction); 157 | 158 | var peer = FrameworkElementAutomationPeer.FromElement(StatusBlock); 159 | if (peer != null) 160 | { 161 | StatusBlock.Text = header + " sorted " + direction.ToString(); 162 | peer.RaiseAutomationEvent(AutomationEvents.LiveRegionChanged); 163 | } 164 | 165 | if (direction == ListSortDirection.Ascending) 166 | { 167 | headerClicked.Column.HeaderTemplate = 168 | Resources["HeaderTemplateArrowUp"] as DataTemplate; 169 | } 170 | else 171 | { 172 | headerClicked.Column.HeaderTemplate = 173 | Resources["HeaderTemplateArrowDown"] as DataTemplate; 174 | } 175 | 176 | // Remove arrow from previously sorted header 177 | if (_lastHeaderClicked != null && _lastHeaderClicked != headerClicked) 178 | { 179 | _lastHeaderClicked.Column.HeaderTemplate = null; 180 | } 181 | 182 | _lastHeaderClicked = headerClicked; 183 | _lastDirection = direction; 184 | } 185 | } 186 | } 187 | 188 | private void Sort(string sortBy, ListSortDirection direction) 189 | { 190 | FillListView(sortBy, direction); 191 | } 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/FileXStatistics.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 44 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/HeaderInfo.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/HeaderInfo.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace AzureRTOS.TraceManagement.Dialogs 16 | { 17 | /// 18 | /// Interaction logic for HeaderInfo.xaml 19 | /// 20 | public partial class HeaderInfo : Window 21 | { 22 | private const uint TML_TRACE_VALID_BE = 0x54585442; 23 | private const uint TML_TRACE_VALID_LE = 0x42545854; 24 | 25 | public HeaderInfo() 26 | { 27 | InitializeComponent(); 28 | InitializeHeaderInfo(); 29 | } 30 | 31 | private void InitializeHeaderInfo() 32 | { 33 | string fileSize = string.Format(CultureInfo.CurrentCulture, "The file length is: {0} bytes.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceFileSize); 34 | listBox1.Items.Add(fileSize); 35 | string traceIdType = ELTMLManaged.TMLFunctions.HeaderInfo.TraceId == TML_TRACE_VALID_LE ? "Little Endian" : "Big Endian"; 36 | string traceId = string.Format(CultureInfo.CurrentCulture, "{0:X8}: {1}: Trace ID found.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceId, traceIdType); 37 | listBox1.Items.Add(traceId); 38 | string timeMask = string.Format(CultureInfo.CurrentCulture, "{0:X8}: Time source mask.", ELTMLManaged.TMLFunctions.HeaderInfo.TimerValidMask); 39 | listBox1.Items.Add(timeMask); 40 | string nameSize = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The number of bytes in object name.", ELTMLManaged.TMLFunctions.HeaderInfo.ObjectNameSize); 41 | listBox1.Items.Add(nameSize); 42 | string baseAddr = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The base address of all pointers.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceBaseAddress); 43 | listBox1.Items.Add(baseAddr); 44 | string startReg = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The pointer to the start of Trace Object Registry.", ELTMLManaged.TMLFunctions.HeaderInfo.ObjectRegistryStartAddress); 45 | listBox1.Items.Add(startReg); 46 | string endReg = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The pointer to the end of Trace Object Registry.", ELTMLManaged.TMLFunctions.HeaderInfo.ObjectRegistryEndAddress); 47 | listBox1.Items.Add(endReg); 48 | string startBuffer = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The pointer to the start of the Trace Buffer Area.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceBufferStartAddress); 49 | listBox1.Items.Add(startBuffer); 50 | string endBuffer = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The pointer to the end of Trace Buffer Area.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceBufferEndAddress); 51 | listBox1.Items.Add(endBuffer); 52 | string oldBuffer = string.Format(CultureInfo.CurrentCulture, "{0:X8}: The pointer to the oldest entry in the Trace Buffer Area.", ELTMLManaged.TMLFunctions.HeaderInfo.TraceBufferCurrentAddress); 53 | listBox1.Items.Add(oldBuffer); 54 | } 55 | 56 | public static Window ShowMe() 57 | { 58 | HeaderInfo hiDlg = new HeaderInfo(); 59 | hiDlg.Show(); 60 | return hiDlg; 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/Legend.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 63 | 64 | 65 | 66 | 67 | 70 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/Legend.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using AzureRTOS.Tml; 8 | using AzureRTOS.TraceManagement.Code; 9 | 10 | namespace AzureRTOS.TraceManagement.Dialogs 11 | { 12 | /// 13 | /// Interaction logic for PopularServices.xaml 14 | /// 15 | public partial class Legend : Window 16 | { 17 | private Dictionary _dictLegend = new Dictionary(); 18 | 19 | Legend(Code.TraceFileInfo tfi, string legendType) 20 | { 21 | InitializeComponent(); 22 | 23 | uint[] array= { }; 24 | 25 | if (legendType == "tx") 26 | { 27 | Title = "ThreadX Legend"; 28 | array = EventArrays.TmlTxEvents; 29 | } 30 | else if(legendType == "fx") 31 | { 32 | Title = "FileX Legend"; 33 | array = EventArrays.TmlFxEvents; 34 | } 35 | else if(legendType == "nx") 36 | { 37 | Title = "NetX Legend"; 38 | array = EventArrays.TmlNxEvents; 39 | } 40 | else if(legendType == "ux") 41 | { 42 | Title = "USBX Legend"; 43 | array = EventArrays.TmlUxEvents; 44 | } 45 | 46 | for (int index = 0; index < array.Length; index++) 47 | { 48 | var te = new TmlEvent 49 | { 50 | Id = Convert.ToUInt32(array[index], CultureInfo.InvariantCulture), 51 | }; 52 | 53 | var e = Code.Event.CreateInstance(te, string.Empty, tfi); 54 | _dictLegend.Add(e.EventTypeName, e.CreateIcon()); 55 | } 56 | 57 | var result = from pair in _dictLegend select pair; 58 | foreach (KeyValuePair pair in result) 59 | { 60 | var canvas = (Canvas)pair.Value; 61 | UIElementCollection children = canvas.Children; 62 | int childcount = children.Count; 63 | 64 | for (int index = 0; index > childcount; index++) 65 | { 66 | Canvas.SetTop(children[index], Canvas.GetTop(children[index]) + 12); 67 | } 68 | var lvi = new KeyValuePairTypeListViewItem 69 | { 70 | Content = pair 71 | }; 72 | 73 | listView1.Items.Add(lvi); 74 | } 75 | } 76 | class KeyValuePairTypeListViewItem 77 | { 78 | public KeyValuePair Content { get; set; } 79 | public override string ToString() 80 | { 81 | return Content.Key; 82 | } 83 | } 84 | 85 | public static Window Show(Code.TraceFileInfo tfi, string legendType) 86 | { 87 | var lDlg = new Legend(tfi, legendType); 88 | lDlg.Show(); 89 | return lDlg; 90 | } 91 | 92 | class LegendItem 93 | { 94 | public LegendItem(string eventName, FrameworkElement icon) 95 | { 96 | EventName = eventName; 97 | Icon = icon; 98 | } 99 | 100 | public string EventName { get; set; } 101 | public FrameworkElement Icon { get; set; } 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/NetXStatistics.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 44 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/PerformStats.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 39 | 42 | 43 | 44 | 47 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/PerformStats.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | using AzureRTOS.Tml; 16 | namespace AzureRTOS.TraceManagement.Dialogs 17 | { 18 | /// 19 | /// Interaction logic for PerformStats.xaml 20 | /// 21 | public partial class PerformStats : Window 22 | { 23 | class PerfStats 24 | { 25 | public string Statistic { get; set; } 26 | public string Occurrences { get; set; } 27 | 28 | public PerfStats(string statistic, string occurrences) 29 | { 30 | Statistic = statistic; 31 | Occurrences = occurrences; 32 | } 33 | } 34 | 35 | class PerfStatsTypeListViewItem 36 | { 37 | public PerfStats Content {get; set; } 38 | public override string ToString() 39 | { 40 | return ("Statistic: " + Content.Statistic + ". Occurances: " + Content.Occurrences); 41 | } 42 | } 43 | 44 | Code.TraceFileInfo tfi; 45 | PerformStats(Code.TraceFileInfo tfi, List threads) 46 | { 47 | this.tfi = tfi; 48 | InitializeComponent(); 49 | 50 | uint deterministic_inversions = ELTMLManaged.TMLFunctions.Performance.DeterministicInversions; 51 | uint non_deterministic_inversions = ELTMLManaged.TMLFunctions.Performance.UndeterministicInversions; 52 | 53 | this.dictThread = new Dictionary>(); 54 | Dictionary dictSum = new Dictionary(); 55 | dictSum.Add("Context Switches", ELTMLManaged.TMLFunctions.Performance.ContextSwitches); 56 | dictSum.Add("Time Slices", ELTMLManaged.TMLFunctions.Performance.TimeSlices); 57 | dictSum.Add("Thread Preemptions", ELTMLManaged.TMLFunctions.Performance.Preemptions); 58 | dictSum.Add("Thread Suspensions", ELTMLManaged.TMLFunctions.Performance.Suspensions); 59 | dictSum.Add("Thread Resumptions", ELTMLManaged.TMLFunctions.Performance.Resumptions); 60 | dictSum.Add("Interrupts", ELTMLManaged.TMLFunctions.Performance.Interrupts); 61 | 62 | dictSum.Add("Priority Inversions", deterministic_inversions + non_deterministic_inversions); 63 | dictSum.Add(" Deterministic", deterministic_inversions); 64 | dictSum.Add(" Non-deterministic", non_deterministic_inversions); 65 | this.dictThread.Add("General Summary - Entire System", dictSum); 66 | 67 | Dictionary dictPerf; 68 | int NameAddition = 0; 69 | foreach (TmlThread tt in threads) 70 | { 71 | dictPerf = new Dictionary(); 72 | string threadName = tt.Name + " (0x" + tt.Address.ToString("x8", CultureInfo.InvariantCulture).ToUpper(CultureInfo.InvariantCulture) + ")"; 73 | 74 | dictPerf.Add("Thread Suspensions", tt.Suspensions); 75 | dictPerf.Add("Thread Resumptions", tt.Resumptions); 76 | 77 | if (dictThread.ContainsKey(threadName)) 78 | { 79 | threadName = threadName + NameAddition.ToString(CultureInfo.InvariantCulture); 80 | NameAddition++; 81 | } 82 | 83 | dictThread.Add(threadName, dictPerf); 84 | } 85 | 86 | comboBox1.Items.Clear(); 87 | foreach (object key in dictThread.Keys) 88 | { 89 | comboBox1.Items.Add(Convert.ToString(key, CultureInfo.CurrentCulture)); 90 | } 91 | comboBox1.SelectedIndex = 0; 92 | 93 | //InitPerfStats(); 94 | } 95 | 96 | Dictionary> dictThread; 97 | 98 | public static Window Show(Code.TraceFileInfo tfi, List threads) 99 | { 100 | PerformStats psDlg = new PerformStats(tfi, threads); 101 | //psDlg.ShowDialog(); 102 | psDlg.Show(); 103 | return psDlg; 104 | } 105 | 106 | private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e) 107 | { 108 | lstvwPerfStats.Items.Clear(); 109 | 110 | Dictionary dict; 111 | dict = this.dictThread[Convert.ToString(comboBox1.SelectedValue, CultureInfo.InvariantCulture)]; 112 | 113 | long sum = this.tfi.Events.Count; 114 | foreach (string key in dict.Keys) 115 | { 116 | PerfStatsTypeListViewItem lvi = new PerfStatsTypeListViewItem(); 117 | lvi.Content = new PerfStats(key, dict[key].ToString(CultureInfo.InvariantCulture)); 118 | lstvwPerfStats.Items.Add(lvi); 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/PopularServices.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 43 | 44 | 45 | 48 | 51 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/TraceX/Dialogs/StackUsage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 | 37 | 38 | 39 | 42 | 45 | 48 | 51 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/TraceX/Images/Event.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Event.ico -------------------------------------------------------------------------------- /src/TraceX/Images/Event.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Event.jpg -------------------------------------------------------------------------------- /src/TraceX/Images/Find_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Find_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Find_24x24_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Find_24x24_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/Information_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Information_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Open_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Open_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Open_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Open_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_16x16.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_16x16_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_16x16_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_24x24_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_24x24_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_24x24_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_24x24_next.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_24x24_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_24x24_previous.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/Play_32x32_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Play_32x32_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/Print_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Print_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Print_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Print_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/SingleEventDetail_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/SingleEventDetail_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/SingleEventDetail_32x32_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/SingleEventDetail_32x32_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/TraceX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/TraceX.ico -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_In_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_In_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_In_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_In_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_In_32x32_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_In_32x32_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_Out_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_Out_24x24.png -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_Out_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_Out_32x32.png -------------------------------------------------------------------------------- /src/TraceX/Images/Zoom_Out_32x32_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/Zoom_Out_32x32_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/black_triangle_24x24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/black_triangle_24x24.gif -------------------------------------------------------------------------------- /src/TraceX/Images/cpu_utilization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/cpu_utilization.png -------------------------------------------------------------------------------- /src/TraceX/Images/execution_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/execution_profile.png -------------------------------------------------------------------------------- /src/TraceX/Images/execution_profile_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/execution_profile_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/preformance_statitics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/preformance_statitics.png -------------------------------------------------------------------------------- /src/TraceX/Images/preformance_statitics_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/preformance_statitics_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/separator.png -------------------------------------------------------------------------------- /src/TraceX/Images/thread_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/thread_stack.png -------------------------------------------------------------------------------- /src/TraceX/Images/thread_stack_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/thread_stack_end.png -------------------------------------------------------------------------------- /src/TraceX/Images/tracexlogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/tracexlogo.jpg -------------------------------------------------------------------------------- /src/TraceX/Images/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/zoom_in.png -------------------------------------------------------------------------------- /src/TraceX/Images/zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/Images/zoom_out.png -------------------------------------------------------------------------------- /src/TraceX/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Eclipse ThreadX TraceX")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Eclipse Foundation")] 14 | [assembly: AssemblyProduct("TraceX")] 15 | [assembly: AssemblyCopyright("")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("3.0.1.0")] 55 | [assembly: AssemblyFileVersion("6.1.3.2")] 56 | -------------------------------------------------------------------------------- /src/TraceX/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AzureRTOS.TraceManagement.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AzureRTOS.TraceManagement.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/TraceX/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /src/TraceX/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AzureRTOS.TraceManagement.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("1000")] 29 | public long MainWidth { 30 | get { 31 | return ((long)(this["MainWidth"])); 32 | } 33 | set { 34 | this["MainWidth"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("600")] 41 | public long MainHeight { 42 | get { 43 | return ((long)(this["MainHeight"])); 44 | } 45 | set { 46 | this["MainHeight"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("")] 53 | public string MainState { 54 | get { 55 | return ((string)(this["MainState"])); 56 | } 57 | set { 58 | this["MainState"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("")] 65 | public string FilesPath { 66 | get { 67 | return ((string)(this["FilesPath"])); 68 | } 69 | set { 70 | this["FilesPath"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("1000000")] 77 | public long uSecPerTick { 78 | get { 79 | return ((long)(this["uSecPerTick"])); 80 | } 81 | set { 82 | this["uSecPerTick"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.UserScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 89 | public bool statusLinesReadyOnly { 90 | get { 91 | return ((bool)(this["statusLinesReadyOnly"])); 92 | } 93 | set { 94 | this["statusLinesReadyOnly"] = value; 95 | } 96 | } 97 | 98 | [global::System.Configuration.UserScopedSettingAttribute()] 99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 101 | public bool statusLinesAllOn { 102 | get { 103 | return ((bool)(this["statusLinesAllOn"])); 104 | } 105 | set { 106 | this["statusLinesAllOn"] = value; 107 | } 108 | } 109 | 110 | [global::System.Configuration.UserScopedSettingAttribute()] 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 113 | public bool statusLinesAllOff { 114 | get { 115 | return ((bool)(this["statusLinesAllOff"])); 116 | } 117 | set { 118 | this["statusLinesAllOff"] = value; 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/TraceX/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 1000 7 | 8 | 9 | 600 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 1000000 19 | 20 | 21 | True 22 | 23 | 24 | False 25 | 26 | 27 | False 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/TraceX/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace AzureRTOS.TraceManagement.Properties { 2 | 3 | 4 | // This class allows you to handle specific events on the settings class: 5 | // The SettingChanging event is raised before a setting's value is changed. 6 | // The PropertyChanged event is raised after a setting's value is changed. 7 | // The SettingsLoaded event is raised after the setting values are loaded. 8 | // The SettingsSaving event is raised before the setting values are saved. 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // To add event handlers for saving and changing settings, uncomment the lines below: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // Add code to handle the SettingChangingEvent event here. 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // Add code to handle the SettingsSaving event here. 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/TraceX/Settings.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/TraceX/Splash.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 24 | 34 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/TraceX/Splash.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.IO; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Input; 8 | using System.Windows.Media; 9 | using System.Windows.Media.Imaging; 10 | using System.Windows.Shapes; 11 | 12 | namespace AzureRTOS.TraceManagement 13 | { 14 | 15 | /// 16 | /// Interaction logic for Splash.xaml 17 | /// 18 | public partial class Splash : Window 19 | { 20 | public string buildDate = GetLinkerTime().ToString("MM/dd/yyyy", CultureInfo.CurrentCulture); 21 | 22 | public bool ShowCloseButton { set { this.btnClose.Visibility = value == true? Visibility.Visible : Visibility.Hidden; } } 23 | 24 | System.Threading.Timer timer; 25 | bool closeOnClick = false; 26 | System.Threading.AutoResetEvent waitEvent = new System.Threading.AutoResetEvent(false); 27 | public Splash() 28 | { 29 | InitializeComponent(); 30 | InitBuildVersion(); 31 | } 32 | public Splash(System.Threading.AutoResetEvent waitEvent) 33 | { 34 | InitializeComponent(); 35 | InitBuildVersion(); 36 | timer = new System.Threading.Timer(new System.Threading.TimerCallback(Timer_Callback), waitEvent, 3000, System.Threading.Timeout.Infinite); 37 | } 38 | 39 | 40 | void Timer_Callback(object param) 41 | { 42 | timer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); 43 | System.Threading.AutoResetEvent waitEvent = (System.Threading.AutoResetEvent)param; 44 | waitEvent.Set(); 45 | } 46 | 47 | public static DateTime GetLinkerTime() 48 | { 49 | System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); 50 | var filePath = assembly.Location; 51 | const int c_PeHeaderOffset = 60; 52 | const int c_LinkerTimestampOffset = 8; 53 | 54 | var buffer = new byte[2048]; 55 | 56 | using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) 57 | stream.Read(buffer, 0, 2048); 58 | 59 | var offset = BitConverter.ToInt32(buffer, c_PeHeaderOffset); 60 | var secondsSince1970 = BitConverter.ToInt32(buffer, offset + c_LinkerTimestampOffset); 61 | var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); 62 | 63 | var linkTimeUtc = epoch.AddSeconds(secondsSince1970); 64 | 65 | var tz = TimeZoneInfo.Local; 66 | var localTime = TimeZoneInfo.ConvertTimeFromUtc(linkTimeUtc, tz); 67 | 68 | return localTime; 69 | } 70 | 71 | private void Window_MouseUp(object sender, MouseButtonEventArgs e) 72 | { 73 | if(closeOnClick) 74 | this.Close(); 75 | } 76 | 77 | public static void ShowMe() 78 | { 79 | System.Threading.AutoResetEvent waitEvent = new System.Threading.AutoResetEvent(false); 80 | Splash splashWindow = new Splash(waitEvent); 81 | splashWindow.closeOnClick = false; 82 | splashWindow.Topmost = true; 83 | splashWindow.Show(); 84 | waitEvent.WaitOne(System.Threading.Timeout.Infinite, true); 85 | splashWindow.Close(); 86 | } 87 | 88 | private void InitBuildVersion() 89 | { 90 | BuildDateText.Text = "Build Date: " + buildDate; 91 | VersionString.Text = TraceXView._tracexVersion; 92 | } 93 | 94 | 95 | private void btnClose_Click(object sender, RoutedEventArgs e) 96 | { 97 | this.Visibility = Visibility.Hidden; 98 | } 99 | 100 | private void btnGot_Focus(object sender, RoutedEventArgs e) 101 | { 102 | Button tb = e.Source as Button; 103 | tb.Background = Brushes.White; 104 | tb.Foreground = Brushes.Black; 105 | } 106 | 107 | private void btnLose_Focus(object sender, RoutedEventArgs e) 108 | { 109 | Button tb = e.Source as Button; 110 | tb.Background = Brushes.Black; 111 | tb.Foreground = Brushes.Gold; 112 | } 113 | 114 | private void btnMouse_Enter(object sender, MouseEventArgs e) 115 | { 116 | Button tb = e.Source as Button; 117 | if (!tb.IsFocused) 118 | { 119 | tb.Foreground = Brushes.Black; 120 | } 121 | } 122 | 123 | private void btnMouse_Leave(object sender, MouseEventArgs e) 124 | { 125 | Button tb = e.Source as Button; 126 | if (!tb.IsFocused) 127 | { 128 | tb.Foreground = Brushes.Gold; 129 | } 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/TraceX/TraceX.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "relative:TraceX" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /src/TraceX/TraceX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-threadx/tracex/b1af4decb38d48958ce3fa5c70d403f0d48aa25b/src/TraceX/TraceX.ico -------------------------------------------------------------------------------- /src/TraceX/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 1000 12 | 13 | 14 | 600 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 1000000 24 | 25 | 26 | True 27 | 28 | 29 | False 30 | 31 | 32 | False 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | --------------------------------------------------------------------------------