Merge a25a403e4b ("perf intel-pt: Fix CYC timestamps after standalone CBR") into android12-5.10-lts

Steps on the way to 5.10.180

Change-Id: Iad8c37b60130351152185ac4de3052a6c150b16e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-06-26 13:14:09 +00:00
2 changed files with 6 additions and 1 deletions

View File

@@ -2279,6 +2279,7 @@ static int find_entire_kern_cb(void *arg, const char *name __maybe_unused,
char type, u64 start)
{
struct sym_args *args = arg;
u64 size;
if (!kallsyms__is_function(type))
return 0;
@@ -2288,7 +2289,9 @@ static int find_entire_kern_cb(void *arg, const char *name __maybe_unused,
args->start = start;
}
/* Don't know exactly where the kernel ends, so we add a page */
args->size = round_up(start, page_size) + page_size - args->start;
size = round_up(start, page_size) + page_size - args->start;
if (size > args->size)
args->size = size;
return 0;
}

View File

@@ -1639,6 +1639,8 @@ static void intel_pt_calc_cbr(struct intel_pt_decoder *decoder)
decoder->cbr = cbr;
decoder->cbr_cyc_to_tsc = decoder->max_non_turbo_ratio_fp / cbr;
decoder->cyc_ref_timestamp = decoder->timestamp;
decoder->cycle_cnt = 0;
intel_pt_mtc_cyc_cnt_cbr(decoder);
}