Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] How does PTP deal with large amount of output (30, 000 lines of OOB record in GDB) ?

Xing Yun,

The typical way to do this is with a multicast reduction network. The network consists of a tree of server processes, with each server having a parent and multiple children. The number of children is called the fanout of the network. At the "root" of the tree is a single process that handles communication with a client (in this case Eclipse). The "leaves" of the tree (i.e. those servers with no children) communicate with the gdbs. The tree is bi-directional. The root-to-leaf direction is used to send commands to the gdbs in a broadcast manner. There is usually some way to prefix the command with the destinations you want it to go to, such as "all", or "1-5000", etc. The leaf-to-root direction is used to manage responses or events from the gdbs. This usually comprises some kind of reduction or aggregation process, so that at each level in the tree, only a small number of messages are passed to the parent, again prefixed in some manner that distinguishes where they have come from. Eventually the "root" receives these messages and passes them to the client.

For the PTP parallel debugger, we aggregate responses from gdb by using a simple hash function. So, as each server receives messages from it's children, it computes the hash over the message, and if any hashes match, the messages are aggregated together. These aggregated messages are then passed to the parent. The PTP debugger implements this network and hashing mechanism internally, however we also have a general multicast/reduction network that can be used by any application. The application just needs to provide "filters", which are simple functions that determine how messages are passed from the parent to the children and vice versa. The debugger code is available in the debug/org.eclipse.ptp.debug.sdm plugin (written in C) and the generic framework is in tools/org.eclipse.ptp.sci (written in C++). Both of these are available from the git repo org.eclipse.ptp.git.

Hope this helps.

Regards,
Greg

On Oct 17, 2012, at 4:03 AM, 邢云 wrote:

Hi PTP guys:

I'm developing a Eclipse debugger product based on CDT, the product is intended for debugging parallel system.  A typical scenario is our product is located in a windows PC, and end users use it to debug a remote system via SSH.

My problem is how to deal with a large amount of output from executing commands in GDB:

1. there are over 9,000 threads from executing "info threads"
2. there are almost 30,000 lines of the output when executing some other command. When the network speed is slow, it takes 2 minutes for the execution to finish.

In fact, it is an issue with using CDT debugger to debug large systems.

PTP is designed for parallel usage and it must have its own philosophy to deal with the large amount of data from GDB, Therefore I'm wondering how do you guys solve this kind of problem.

9000 threads in the output of "info threads" could be a good example. It is highly possilbe that the Debug View needs to be refreshed in case of spawned/exited threads and therefore it issues an "info threads" command to gdb.
End users won't be that patient to wait 1 minute to see 9000 threads in screen again.

Is there any good idea?

Thanks a lot.

Regards
Xing Yun








_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top