SlideServe
Menu
Préférences
© SlideServe · v2026

TotalView Memory Debugging

sbranch avatar
8 diapositives · 109 Views · Jan 03, 2020

Learn about the value-added features of TotalView Memory Debugging, including heap block display, stack tracing, memory usage comparison, and more. Discover how to prepare, invoke, and utilize TotalView Memory Debugging for efficient code optimization and memory error detection. Explore the basics, heap debugging assistance, power tools, and automatic event notifications provided by TotalView. Enhance your memory debugging capabilities and optimize your code effectively with TotalView Memory Debugging.

TotalView Memory Debugging - slide 1
01 / 8TotalView Memory Debugging
1 / 17

Télécharger la présentation

TotalView Memory Debugging
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Matt WolfeLC Development Environment GroupLawrence Livermore National Laboratory TotalView Memory Debugging Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA 94551 This work performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344 LLNL-PRES-426092

  2. TotalView Memory Debugging Value-Adds • See allocation detail on variable display • Display heap block contents • Compare memory usage and heap across processes or times • Records stack trace at points of allocation/deallocation • Reports block and byte counts by unique stack trace • Automatically catches selected memory use errors • Graphically displays the heap • Assists heap corruption debugging

  3. Preparing Code and Invoking TotalView (TV) Memory Debugging • Build as you would for TV debugging • Link with the Heap Interposition Agent (HIA) if necessary For stand-alone runs and to attach to running code For core file memory debugging For certain platforms and link methods • Start code under TV: use mtv in place of totalview, or totalview -memory_debugging -no_mem_notify_events • Attach to and inspect running code+HIA • Post mortem core file inspection of code+HIA

  4. Memory Debugging Basics • HIA runs and records data in user's process space • Browser-style user interface • Work with selected processes or groups, stop on event • Chart memory usage by memory type and by process or library • Display list of current allocations • Display stack trace at allocation/deallocation • Save and share some reports as HTML • Save memory data for later comparison

  5. Heap Debugging Assists • Heap block end guards catch out-of-bounds array writes • "Red Zone" end guards immediately catch by page faults • Block painting catches read-before-write and read-after-deallocation bugs • Deallocation hoarding identifies late-read bugs • Graphical view shows memory regions and nearby blocks

  6. Memory Debugging Power Tools • Memory leak report • Filter out files you have no control over • Sort to focus on worst offenders • Report heap blocks by stack trace or source line • Report corrupted memory • Set baseline and compare memory to baseline • Compare memory of different processes from multiple runs • memscript

  7. Automatic Event Notifications • Report most recent event per process • Report processes stopped at the same event • Notify [re-]allocation failures • Notify alignment errors • Notify de/re-allocation of a specific block • Notify deallocation with corrupted end guard • Notify Red Zone events including use after free • Notify code exit

  8. TVTech Memory Debugging Resources • On-screen help • Help menu • '?' button • Tips menu • CLI: help dheap