#!/usr/bin/perl -w # # pkgsplit-perf.pl Split IP samples on package names "/", eg, Java. # # This is for the creation of Java package flame graphs. Example steps: # # perf record -F 199 -a -- sleep 30; ./jmaps # perf script | ./pkgsplit-perf.pl | ./flamegraph.pl > out.svg # # Note that stack traces are not sampled (no -g), as we split Java package # names into frames rather than stack frames. # # (jmaps is a helper script for automating perf-map-agent: Java symbol dumps.) # # The default output of "perf script" varies between kernel versions, so we'll # need to deal with that here. I could make people use the perf script option # to pick fields, so our input is static, but A) I prefer the simplicity of # just saying: run "perf script", and B) the option to choose fields itself # changed between kernel versions! -f became -F. # # Copyright 2017 Netflix, Inc. # Licensed under the Apache License, Version 2.0 (the "License") # # 20-Sep-2016 Brendan Gregg Created this.
use strict;
my $include_pname = 1; # include process names in stacks
my $include_pid = 0; # include process ID with process name
my $include_tid = 0; # include process & thread ID with process name
while (<>) { # filter comments
next if /^#/;
# filter idle events
next if /xen_hypercall_sched_op|cpu_idle|native_safe_halt/;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.