Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why should I use barrier points instead of breakpoints when debugging multi-process and multi-threaded programs?

0
Posted

Why should I use barrier points instead of breakpoints when debugging multi-process and multi-threaded programs?

0

Because threads and processes can be doing different things, keeping things together is difficult. The best strategy is to define places where the program can run freely and places where you need to keep things under control. This is where barrier points come in. To keep things simple, I’ll only talk about multi-process programs. The same things are true for multi-threaded programs. Why breakpoints don’t work (part 1) If you set a breakpoint that stops all processes when it is hit and you let your processes run using Group > Go, you can get lucky and all of them will be at the breakpoint. What’s more likely is that some processes won’t have reached the breakpoint and TotalView will have stopped them wherever they happen to be. To get things synchronized, you’ll need to find out which ones didn’t get there and then individually get them to the breakpoint using Process > Go. You can’t use Group > Go as this will also run the processes stopped at the breakpoint. Why breakpoints don’t work

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.