Valgrind manual espaol




















Cache Simulation Specifics 5. Branch Simulation Specifics 5. Accuracy 5. Implementation Details 5. How Cachegrind Works 5. Cachegrind Output File Format 6. Callgrind: a call-graph generating cache and branch prediction profiler 6. Overview 6. Functionality 6. Basic Usage 6. Advanced Usage 6. Multiple profiling dumps from one program run 6. Limiting the range of collected events 6. Counting global bus events 6. Avoiding cycles 6. Forking Programs 6. Callgrind Command-line Options 6.

Dump creation options 6. Activity options 6. Data collection options 6. Cost entity separation options 6. Simulation options 6. Cache simulation options 6. Callgrind Monitor Commands 6. Callgrind specific client requests 6. Helgrind: a thread error detector 7.

Overview 7. Detected errors: Inconsistent Lock Orderings 7. Detected errors: Data Races 7. A Simple Data Race 7. Helgrind's Race Detection Algorithm 7.

Interpreting Race Error Messages 7. Hints and Tips for Effective Use of Helgrind 7. Helgrind Command-line Options 7.

Helgrind Monitor Commands 7. Helgrind Client Requests 7. A To-Do List for Helgrind 8. DRD: a thread error detector 8. Overview 8. Multithreaded Programming Paradigms 8. Multithreaded Programming Problems 8. Data Race Detection 8. Using DRD 8. DRD Command-line Options 8.

Detected Errors: Data Races 8. Detected Errors: Lock Contention 8. Client Requests 8. Debugging Boost. Thread Programs 8. Debugging OpenMP Programs 8. DRD Versus Memcheck 8. Resource Requirements 8. Mutex types 8. Condition variables 8. Limitations 8. Feedback 9. Massif: a heap profiler 9. Overview 9. An Example Program 9. Running Massif 9. The Output Preamble 9. The Output Graph 9. The Snapshot Details 9. Forking Programs 9. Measuring All Memory in a Process 9.

Acting on Massif's Information 9. Using massif-visualizer 9. Massif Command-line Options 9. Massif Monitor Commands 9. Massif Client Requests 9. Massif's Output File Format DHAT: a dynamic heap analysis tool Overview Using DHAT Running DHAT Output File DHAT's Viewer The Output Header The PP Tree The Output Footer Sort Metrics Treatment of realloc Copy profiling Ad hoc profiling Lackey: an example tool Lackey Command-line Options Nulgrind: the minimal Valgrind tool BBV: an experimental basic block vector generation tool BBV Command-line Options Basic Block Vector File Format Implementation For full documentation of Memcheck and the other tools, please read the User Manual.

Compile your program with -g to include debugging information so that Memcheck's error messages include exact line numbers. Using -O0 is also a good idea, if you can tolerate the slowdown. With -O1 line numbers in error messages can be inaccurate, although generally speaking running Memcheck on code compiled at -O1 works fairly well, and the speed improvement compared to running -O0 is quite significant.

Use of -O2 and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist. Memcheck is the default tool. The --leak-check option turns on the detailed memory leak detector. Your program will run much slower eg. Memcheck will issue messages about memory errors and leaks that it detects.

The first line "Invalid write Here, the program wrote to some memory it should not have due to a heap block overrun. Below the first line is a stack trace telling you where the problem occurred.

Reading them from the bottom up can help. If the stack trace is not big enough, use the --num-callers option to make it bigger. The code addresses eg. Some error messages have a second component which describes the memory address involved. This one shows that the written memory is just past the end of a block allocated with malloc on line 5 of example. It's worth fixing errors in the order they are reported, as later errors can be caused by earlier errors.

Failing to do this is a common cause of difficulty with Memcheck. The stack trace tells you where the leaked memory was allocated. Memcheck cannot tell you why the memory leaked, unfortunately. Memcheck also reports uses of uninitialised values, most commonly with the message "Conditional jump or move depends on uninitialised value s ".

It can be difficult to determine the root cause of these errors.



0コメント

  • 1000 / 1000