• Robert Richter's avatar
    oprofile: rework implementation of cpu buffer events · ae735e99
    Robert Richter authored
    Special events such as task or context switches are marked with an
    escape code in the cpu buffer followed by an event code or a task
    identifier. There is one escape code per event. To make escape
    sequences also available for data samples the internal cpu buffer
    format must be changed. The current implementation does not allow the
    extension of event codes since this would lead to collisions with the
    task identifiers. To avoid this, this patch introduces an event mask
    that allows the storage of multiple events with one escape code. Now,
    task identifiers are stored in the data section of the sample. The
    implementation also allows the usage of custom data in a sample. As a
    side effect the new code is much more readable and easier to
    understand.
    Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
    ae735e99
cpu_buffer.c 10.9 KB