lkml.org 
[lkml]   [2015]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V5 13/16] perf tools: Intel PT to always update thread stack trace number
    Date
    The enhanced thread stack is used by higher layers but still
    requires the trace number. The trace number is used to
    distinguish discontinuous sections of trace (for example
    from Snapshot mode or Sample mode), which cause the thread
    stack to be flushed.

    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    ---
    tools/perf/util/intel-pt.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
    index 9c25bfa..5a59fd8 100644
    --- a/tools/perf/util/intel-pt.c
    +++ b/tools/perf/util/intel-pt.c
    @@ -265,7 +265,7 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
    if (!old_buffer || ptq->pt->sampling_mode || (ptq->pt->snapshot_mode &&
    !buffer->consecutive)) {
    b->consecutive = false;
    - b->trace_nr = buffer->buffer_nr;
    + b->trace_nr = buffer->buffer_nr + 1;
    } else {
    b->consecutive = true;
    }
    @@ -1075,6 +1075,8 @@ static int intel_pt_sample(struct intel_pt_queue *ptq)
    thread_stack__event(ptq->thread, ptq->flags, state->from_ip,
    state->to_ip, ptq->insn_len,
    state->trace_nr);
    + else
    + thread_stack__set_trace_nr(ptq->thread, state->trace_nr);

    if (pt->sample_branches) {
    err = intel_pt_synth_branch_sample(ptq);
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-05-22 14:01    [W:2.453 / U:0.352 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site