Creating Groups

TotalView automatically creates and places items in groups as they are created. The exception is the lockstep groups that are created or changed whenever a program hits an action point or is stopped for any reason. While there are many ways that this kind of organization can be built up, the following steps indicate the beginnings of how this might occur:

  1. TotalView and your program are launched and your program begins executing within TotalView.

    Control group: A group is created as the program is loaded.

    Share group: A group is created as the program begins executing.

    Workers group: The thread in the main routine is the workers group.

    Lockstep group: There is no lockstep group because the thread is running.

    Step 1: A Program Starts

  2. The program forks a process.

    Control group: A second process is added to the existing group.

    Share group: A second process is added to the existing group.

    Workers group: TotalView adds the thread in the second process to the existing group.

    Lockstep group: There are no lockstep groups because the threads are running.

    Step 2: Forking a Process

  3. The second process is exec'd.

    Control group: The group is unchanged.

    Share group: A second share group is created having this exec'd process as a member. This process is removed from the first share group.

    Workers group: Both threads are in the worker s group.

    Lockstep group: There are no lockstep groups because the threads are running.

    Step 3: Exec'ing a Process

  4. The first process hits a break point.

    Control group: The group is unchanged.

    Share group: The groups are unchanged.

    Workers group: The group is unchanged.

    Lockstep group: A lockstep group is created whose member is the thread of the current process. (In this example, each thread is its own lockstep group.)

  5. The program is continued and a second version of your program is started from the shell. You attach to it within TotalView and put it in the same control group as your first process.

    Control group: A third process is added.

    Share group: This third process is added to the first share group.

    Workers group: The thread in this third process is added to the group.

    Lockstep group: There are no lockstep groups because the threads are running.

    Step 5: Creating a Second Version

  6. Your program creates a process on another computer.

    Control group: The control group is extended so that it contains this fourth process that is running on the second computer.

    Share group: The first share group now contains this newly created process even though it is running on the second computer.

    Workers group: The thread within this fourth process is added to the workers group.

    Lockstep group: There are no lockstep groups because the threads are running.

    Step 6: Creating a Remote Process

  7. A process within control group 1 creates a thread. This adds a second thread to one of the processes.

    Control group: The group is unchanged.

    Share group: The group is unchanged.

    Workers group: A fourth thread is added to this group.

    Lockstep group: There are no lockstep groups because the threads are running.

    Step 7: A Thread Is Created

  8. A breakpoint is set on a line within a process executing in the first share group and the breakpoint is shared. The process executes until all three processes are at the breakpoint.

    Control group: The group is unchanged.

    Share group: The groups are unchanged.

    Workers group: The group is unchanged.

    Lockstep groups: Lockstep groups are created whose members are the four threads in the first share group.

    Step 8: Hitting a Breakpoint

  9. You tell TotalView to step the lockstep group.

    Control group: The group is unchanged.

    Share group: The groups are unchanged.

    Workers group: The group is unchanged.

    Lockstep group: The lockstep groups are unchanged. (Note that there are other lockstep groups.)

    Step 9: Stepping the Lockstep Group

Clearly, this example could keep on going until a much more complicated system of processes and threads was created. However, it should give you an idea of what is occurring.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0