On 05/31/2012 11:41 AM, Pantelis Antoniou wrote:
There are a number of problems that this patch solves.
Do you have a feedback from core perf developers?
1. The format used by default is the binary perf trace format which is both non-portable between arches and non human editable. The format spr-replay uses is text based and easily understandable, and completely portable between arches& kernel version. It can been used to collect load data from an android ICS setup and then have the load analyzed in a normal linux x86 host.
I agree. But, there was a lot of work to make perf.data is really portable (although it's not so at this moment yet). Most probably others will have a strong objections against one more new data format just because a few unsolved issues with an old one.
Example use:
IIUC something is broken now. I did: perf record -a -R -f -m 8192 -c 1 -e sched:sched_switch -e sched:sched_process_exit \ -e sched:sched_process_fork -e sched:sched_wakeup -e sched:sched_migrate_task /bin/ls -la / and then 'perf sched spr-replay -l -n': [kworker/1:1/20] S R:2746584 [sshd/3102] S R:7293700 [perf/3749] S R:0 [perf/3750] S R:22583006 [swapper/1/0] S R:19165041 No events recorded for 'ls'? Obviously wrong since 'perf report --stdio' shows: # Samples: 134 of event 'sched:sched_switch' # Event count (approx.): 134 # # Overhead Command Shared Object Symbol # ........ ........... ............. ...... # 42.54% ls [unknown] [.] 00000000 41.79% kworker/1:1 [unknown] [.] 00000000 8.21% swapper [unknown] [.] 00000000 6.72% sshd [unknown] [.] 00000000 0.75% perf [unknown] [.] 00000000 I suppose 'ls' is incorrectly reported as [perf/3750] here. And, finally, please fix annoying warnings about set-but-unused variables since this can't be compiled with -Werror (which is on by default) with never versions of gcc. Dmitry
--- /tmp/builtin-sched.c 2012-05-31 09:01:00.000000000 +0000 +++ perf/builtin-sched.c 2012-05-31 08:41:55.000000000 +0000 @@ -342,7 +342,7 @@ { u64 loops, last_loops, new_loops; u64 sample_period; - u64 ns1, ns2, delta, delta_new, delta_diff; + u64 ns1, ns2, delta; /* 1 ms */ sample_period = 1000000; @@ -362,12 +362,6 @@ } while (delta < sample_period); new_loops = ((last_loops * sample_period) + (delta / 2)) / delta; - delta_new = bogoloops_measure_stable(new_loops); - - if (delta_new > sample_period) - delta_diff = delta_new - sample_period; - else - delta_diff = sample_period - delta_new; bogoloops = new_loops; } @@ -3404,7 +3398,7 @@ static struct task *generate_spr_program(struct task_desc *task, unsigned long *map_id_fwd, unsigned long *next_opt_id) { - struct sched_atom *atom, *atom_last; + struct sched_atom *atom; unsigned long eventnr; unsigned int exited; unsigned int blocked; @@ -3491,8 +3485,6 @@ for (eventnr = 0; eventnr < task->nr_events && !exited; eventnr++) { - atom_last = atom; - atom = task->atoms[eventnr]; exited = atom->type == SCHED_EVENT_EXIT;
_______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev