def formatCoreEvent(eventComp):
    """Formats Core event components for use as "vmkperf start [event]"."""

    eventN = eventComp[1] # Place in which the event was processed
    name = eventComp[3] # Name of the event
    eventSel = eventComp[4] # eventSel of the event
    unitMask = eventComp[5] # unitMask of the event
    modifiers = eventComp[6] # modifiers of the event
    cmask = eventComp[7] # cmask of the event

    # Determines which event components were provided with the event, and
    # constructs the event string accordingly.
    event = eventN
    if eventSel is None and unitMask is None:
        event = name
    if eventSel is not None:
        event = '%s -e%s' % (event, eventSel)
    if unitMask is not None:
        event = '%s -u%s' % (event, unitMask)
    if modifiers is not None:
        event = '%s -d%s' % (event, modifiers)
    if cmask is not None:
        event = '%s -c%s' % (event, cmask)

    return event