| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 1 | perf-diff(1) | 
| Arnaldo Carvalho de Melo | 4778e0e | 2010-05-05 11:23:27 -0300 | [diff] [blame] | 2 | ============ | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 3 |  | 
|  | 4 | NAME | 
|  | 5 | ---- | 
| Ingo Molnar | d30531c | 2009-12-15 10:24:08 +0100 | [diff] [blame] | 6 | perf-diff - Read two perf.data files and display the differential profile | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 7 |  | 
|  | 8 | SYNOPSIS | 
|  | 9 | -------- | 
|  | 10 | [verse] | 
|  | 11 | 'perf diff' [oldfile] [newfile] | 
|  | 12 |  | 
|  | 13 | DESCRIPTION | 
|  | 14 | ----------- | 
| Ingo Molnar | d30531c | 2009-12-15 10:24:08 +0100 | [diff] [blame] | 15 | This command displays the performance difference amongst two perf.data files | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 16 | captured via perf record. | 
|  | 17 |  | 
|  | 18 | If no parameters are passed it will assume perf.data.old and perf.data. | 
|  | 19 |  | 
| Jiri Olsa | 863e451 | 2012-09-06 17:46:55 +0200 | [diff] [blame] | 20 | The differential profile is displayed only for events matching both | 
|  | 21 | specified perf.data files. | 
|  | 22 |  | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 23 | OPTIONS | 
|  | 24 | ------- | 
| Shawn Bohrer | 5ea4f85 | 2010-11-30 19:57:12 -0600 | [diff] [blame] | 25 | -M:: | 
|  | 26 | --displacement:: | 
|  | 27 | Show position displacement relative to baseline. | 
|  | 28 |  | 
|  | 29 | -D:: | 
|  | 30 | --dump-raw-trace:: | 
|  | 31 | Dump raw trace in ASCII. | 
|  | 32 |  | 
|  | 33 | -m:: | 
|  | 34 | --modules:: | 
|  | 35 | Load module symbols. WARNING: use only with -k and LIVE kernel | 
|  | 36 |  | 
| Arnaldo Carvalho de Melo | c351c28 | 2009-12-16 13:49:27 -0200 | [diff] [blame] | 37 | -d:: | 
|  | 38 | --dsos=:: | 
|  | 39 | Only consider symbols in these dsos. CSV that understands | 
|  | 40 | file://filename entries. | 
|  | 41 |  | 
|  | 42 | -C:: | 
|  | 43 | --comms=:: | 
|  | 44 | Only consider symbols in these comms. CSV that understands | 
|  | 45 | file://filename entries. | 
|  | 46 |  | 
|  | 47 | -S:: | 
|  | 48 | --symbols=:: | 
|  | 49 | Only consider these symbols. CSV that understands | 
|  | 50 | file://filename entries. | 
|  | 51 |  | 
|  | 52 | -s:: | 
|  | 53 | --sort=:: | 
|  | 54 | Sort by key(s): pid, comm, dso, symbol. | 
|  | 55 |  | 
|  | 56 | -t:: | 
|  | 57 | --field-separator=:: | 
|  | 58 |  | 
|  | 59 | Use a special separator character and don't pad with spaces, replacing | 
| Shawn Bohrer | 5ea4f85 | 2010-11-30 19:57:12 -0600 | [diff] [blame] | 60 | all occurrences of this separator in symbol names (and other output) | 
| Arnaldo Carvalho de Melo | c351c28 | 2009-12-16 13:49:27 -0200 | [diff] [blame] | 61 | with a '.' character, that thus it's the only non valid separator. | 
|  | 62 |  | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 63 | -v:: | 
|  | 64 | --verbose:: | 
| Ingo Molnar | d30531c | 2009-12-15 10:24:08 +0100 | [diff] [blame] | 65 | Be verbose, for instance, show the raw counts in addition to the | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 66 | diff. | 
| Arnaldo Carvalho de Melo | cdccc69 | 2009-12-15 11:01:22 -0200 | [diff] [blame] | 67 |  | 
| Shawn Bohrer | 5ea4f85 | 2010-11-30 19:57:12 -0600 | [diff] [blame] | 68 | -f:: | 
|  | 69 | --force:: | 
|  | 70 | Don't complain, do it. | 
|  | 71 |  | 
| David Ahern | ec5761e | 2010-12-09 13:27:07 -0700 | [diff] [blame] | 72 | --symfs=<directory>:: | 
|  | 73 | Look for files with symbols relative to this directory. | 
| Shawn Bohrer | 5ea4f85 | 2010-11-30 19:57:12 -0600 | [diff] [blame] | 74 |  | 
| Jiri Olsa | a06d143 | 2012-10-05 16:44:40 +0200 | [diff] [blame] | 75 | -b:: | 
|  | 76 | --baseline-only:: | 
|  | 77 | Show only items with match in baseline. | 
|  | 78 |  | 
| Jiri Olsa | 7aaf6b3 | 2012-10-05 16:44:41 +0200 | [diff] [blame] | 79 | -c:: | 
|  | 80 | --compute:: | 
| Jiri Olsa | 81d5f95 | 2012-10-05 16:44:43 +0200 | [diff] [blame] | 81 | Differential computation selection - delta,ratio,wdiff (default is delta). | 
| Jiri Olsa | 96c47f1 | 2012-10-05 16:44:42 +0200 | [diff] [blame] | 82 | If '+' is specified as a first character, the output is sorted based | 
|  | 83 | on the computation results. | 
| Jiri Olsa | 7aaf6b3 | 2012-10-05 16:44:41 +0200 | [diff] [blame] | 84 | See COMPARISON METHODS section for more info. | 
|  | 85 |  | 
| Jiri Olsa | 61949b2 | 2012-10-05 16:44:44 +0200 | [diff] [blame] | 86 | -p:: | 
|  | 87 | --period:: | 
|  | 88 | Show period values for both compared hist entries. | 
|  | 89 |  | 
| Jiri Olsa | ed279da | 2012-10-05 16:44:45 +0200 | [diff] [blame] | 90 | -F:: | 
|  | 91 | --formula:: | 
|  | 92 | Show formula for given computation. | 
|  | 93 |  | 
| Jiri Olsa | 7aaf6b3 | 2012-10-05 16:44:41 +0200 | [diff] [blame] | 94 | COMPARISON METHODS | 
|  | 95 | ------------------ | 
|  | 96 | delta | 
|  | 97 | ~~~~~ | 
|  | 98 | If specified the 'Delta' column is displayed with value 'd' computed as: | 
|  | 99 |  | 
|  | 100 | d = A->period_percent - B->period_percent | 
|  | 101 |  | 
|  | 102 | with: | 
|  | 103 | - A/B being matching hist entry from first/second file specified | 
|  | 104 | (or perf.data/perf.data.old) respectively. | 
|  | 105 |  | 
|  | 106 | - period_percent being the % of the hist entry period value within | 
|  | 107 | single data file | 
|  | 108 |  | 
|  | 109 | ratio | 
|  | 110 | ~~~~~ | 
|  | 111 | If specified the 'Ratio' column is displayed with value 'r' computed as: | 
|  | 112 |  | 
|  | 113 | r = A->period / B->period | 
|  | 114 |  | 
|  | 115 | with: | 
|  | 116 | - A/B being matching hist entry from first/second file specified | 
|  | 117 | (or perf.data/perf.data.old) respectively. | 
|  | 118 |  | 
|  | 119 | - period being the hist entry period value | 
|  | 120 |  | 
| Jiri Olsa | 81d5f95 | 2012-10-05 16:44:43 +0200 | [diff] [blame] | 121 | wdiff | 
|  | 122 | ~~~~~ | 
|  | 123 | If specified the 'Weighted diff' column is displayed with value 'd' computed as: | 
|  | 124 |  | 
|  | 125 | d = B->period * WEIGHT-A - A->period * WEIGHT-B | 
|  | 126 |  | 
|  | 127 | - A/B being matching hist entry from first/second file specified | 
|  | 128 | (or perf.data/perf.data.old) respectively. | 
|  | 129 |  | 
|  | 130 | - period being the hist entry period value | 
|  | 131 |  | 
|  | 132 | - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option | 
|  | 133 | behind ':' separator like '-c wdiff:1,2'. | 
| Jiri Olsa | 7aaf6b3 | 2012-10-05 16:44:41 +0200 | [diff] [blame] | 134 |  | 
| Arnaldo Carvalho de Melo | 86a9eee | 2009-12-14 20:09:31 -0200 | [diff] [blame] | 135 | SEE ALSO | 
|  | 136 | -------- | 
|  | 137 | linkperf:perf-record[1] |