import optparse


def WPFilterGroup(parser):
    """Define the group for options which apply filters to relogging of whole program pinballs."""

    group = optparse.OptionGroup(
        parser, "Whole program pinball filtering phases and options (relogging)",
        "These options define phases which are used to 'filter' the whole program pinballs "
        "during relogging. When multiple filters are selected, they are applied in the order "
        "the options are listed below. "
        "There are two types of options listed here: 'relog_*' and 'use_relog_*'. \n\n"
        ""
        "The first type of option (relog_*) define phases which modify WP pinballs by relogging with a set of "
        "knobs which 'filter out' various type of instructions.  For example, filter on a focus thread "
        "or remove initialization instructions using SSC marks.  "
        "The relog_* options are 'sticky' options.  That means, once they are used on a command "
        "line, the tracing environment will remember these options.  The next time you run the "
        "script, it will use the filtered whole program pinballs generated "
        "using the relog_* options. \n\n"
        ""
        "The 2nd type of option (use_relog_*) are used to select a set of filtered WP pinballs "
        "for the current invocation of the script.  The use_relog_* options "
        "on the current command line are used to select the set of filtered pinballs for this "
        "run instead of using the default set of filtered WP pinballs. This allows the user to "
        "over-ride a set of 'sticky' relog_* options.  Once you apply a set of use_relog_* options, these "
        "filters are used as the new 'sticky' filtering options.")

    return group