031c8d5e | 29-Jun-2020 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result
Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selectio
perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result
Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selection.
Example:
$ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls 2020-06-26 15:32:14.928997 Creating database ... 2020-06-26 15:32:14.933971 Writing records... 2020-06-26 15:32:15.535251 Adding indexes 2020-06-26 15:32:15.542993 Dropping unused tables 2020-06-26 15:32:15.549716 Done $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
Select: Reports -> Call Tree Press: Ctrl-F Enter: unknown Press: Enter
Before: displays 'unknown' not found After: tree is expanded to line showing 'unknown'
Fixes: ae8b887c00d3f ("perf scripts python: exported-sql-viewer.py: Add call tree") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200629091955.17090-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
7ff520b0 | 29-Jun-2020 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result
Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selectio
perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result
Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selection.
Example:
$ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls 2020-06-26 15:32:14.928997 Creating database ... 2020-06-26 15:32:14.933971 Writing records... 2020-06-26 15:32:15.535251 Adding indexes 2020-06-26 15:32:15.542993 Dropping unused tables 2020-06-26 15:32:15.549716 Done $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
Select: Reports -> Context-Sensitive Call Graph Press: Ctrl-F Enter: unknown Press: Enter
Before: gets stuck After: tree is expanded to line showing 'unknown'
Fixes: 254c0d820b86d ("perf scripts python: exported-sql-viewer.py: Factor out CallGraphModelBase") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200629091955.17090-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
3a3cf7c5 | 29-Jun-2020 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result
Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find') would not expand the tree to the result. Fix by using
perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result
Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find') would not expand the tree to the result. Fix by using setExpanded().
Example:
$ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py perf.data.db branches calls 2020-06-26 15:32:14.928997 Creating database ... 2020-06-26 15:32:14.933971 Writing records... 2020-06-26 15:32:15.535251 Adding indexes 2020-06-26 15:32:15.542993 Dropping unused tables 2020-06-26 15:32:15.549716 Done $ python3 ~/libexec/perf-core/scripts/python/exported-sql-viewer.py perf.data.db
Select: Reports -> Context-Sensitive Call Graph or Reports -> Call Tree Press: Ctrl-F Enter: main Press: Enter
Before: line showing 'main' does not display
After: tree is expanded to line showing 'main'
Fixes: ebd70c7dc2f5f ("perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200629091955.17090-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
b3700f21 | 21-Aug-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Add Time chart by CPU
Add a time chart based on context switch information.
Context switch information was added to the database export fairly recently,
perf scripts python: exported-sql-viewer.py: Add Time chart by CPU
Add a time chart based on context switch information.
Context switch information was added to the database export fairly recently, so the chart menu option will only appear if context switch information is in the database.
Refer to the Exported SQL Viewer Help option for more information about the chart.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20190821083216.1340-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
e69d5df7 | 21-Aug-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Add ability for Call tree to open at a specified task and time
Add ability for Call tree to open at a specified task and time.
Signed-off-by: Adrian Hun
perf scripts python: exported-sql-viewer.py: Add ability for Call tree to open at a specified task and time
Add ability for Call tree to open at a specified task and time.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20190821083216.1340-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
da4264f5 | 21-Aug-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Tidy up Call tree call_time
Record call_time on tree nodes and re-name the misnamed "count" parameter.
Signed-off-by: Adrian Hunter <adrian.hunter@intel
perf scripts python: exported-sql-viewer.py: Tidy up Call tree call_time
Record call_time on tree nodes and re-name the misnamed "count" parameter.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20190821083216.1340-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
9a9dae36 | 21-Aug-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Add global time range calculations
Add calculations to determine a time range that encompasses all data.
Signed-off-by: Adrian Hunter <adrian.hunter@int
perf scripts python: exported-sql-viewer.py: Add global time range calculations
Add calculations to determine a time range that encompasses all data.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20190821083216.1340-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
42c303ff | 21-Aug-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Add HBoxLayout and VBoxLayout
Add layout classes HBoxLayout and VBoxLayout.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@
perf scripts python: exported-sql-viewer.py: Add HBoxLayout and VBoxLayout
Add layout classes HBoxLayout and VBoxLayout.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20190821083216.1340-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
56789f3d | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-postgresql.py: Export switch events
Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show auto
perf scripts python: export-to-postgresql.py: Export switch events
Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show automatically in the exported-sql-viewer.py script.
If the table ends up empty, then it and the view are dropped.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-22-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
37c1f991 | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-sqlite.py: Export switch events
Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show automati
perf scripts python: export-to-sqlite.py: Export switch events
Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show automatically in the exported-sql-viewer.py script.
If the table ends up empty, then it and the view are dropped.
Committer testing:
Use the exported-sql-viewer.py and look at "Tables" -> "context_switches":
id machine_id time cpu thread_out_id comm_out_id thread_in_id comm_in_id flags 1 1 187836111885918 7 1 1 2 2 3 2 1 187836111889369 7 1 1 2 2 0 3 1 187836112464618 7 2 3 1 1 1 4 1 187836112465511 7 2 3 1 1 0
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-21-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
26c11206 | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column
If the new 'has_calls' column is present, use it with the call graph and call tree to select only comms that have calls.
Comm
perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column
If the new 'has_calls' column is present, use it with the call graph and call tree to select only comms that have calls.
Committer testing:
Just started the exported-sql-view.py and accessed all the reports, no backtraces.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
26688729 | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: exported-sql-viewer.py: Remove redundant semi-colons
Remove redundant semi-colons added inadvertently.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jol
perf scripts python: exported-sql-viewer.py: Remove redundant semi-colons
Remove redundant semi-colons added inadvertently.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
d9efc1d2 | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-postgresql.py: Add has_calls column to comms table
Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. T
perf scripts python: export-to-postgresql.py: Add has_calls column to comms table
Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. That can happen because the calls are recorded against the main thread's initial comm.
Add a table column to make it easy for the exported-sql-viewer.py script to select only comms with calls.
Committer testing:
$ rm -f simple-retpoline.db $ sudo ~acme/bin/perf script -i simple-retpoline.perf.data --itrace=be -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py simple-retpoline.db branches calls 2019-07-10 12:25:33.200529 Creating database ... 2019-07-10 12:25:33.211548 Writing records... 2019-07-10 12:25:33.549630 Adding indexes 2019-07-10 12:25:33.560715 Dropping unused tables 2019-07-10 12:25:33.580201 Done $ sha256sum tools/perf/scripts/python/export-to-sqlite.py ~/libexec/perf-core/scripts/python/export-to-sqlite.py 2922b642c392004dffa1d8789296478c85904623f5895bcb9b6cbf33e3ca999f tools/perf/scripts/python/export-to-sqlite.py 2922b642c392004dffa1d8789296478c85904623f5895bcb9b6cbf33e3ca999f /home/acme/libexec/perf-core/scripts/python/export-to-sqlite.py $ $ sqlite3 simple-retpoline.db SQLite version 3.26.0 2018-12-01 12:34:55 Enter ".help" for usage hints. sqlite> .schema comms CREATE TABLE comms (id integer NOT NULL PRIMARY KEY,comm varchar(16),c_thread_id bigint,c_time bigint,exec_flag boolean, has_calls boolean); sqlite> select id,has_calls from comms; 0|1 1|1 sqlite> select distinct comm_id from calls; 0 1 sqlite>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
ecc8c998 | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-sqlite.py: Add has_calls column to comms table
Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. That
perf scripts python: export-to-sqlite.py: Add has_calls column to comms table
Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. That can happen because the calls are recorded against the main thread's initial comm.
Add a table column to make it easy for the exported-sql-viewer.py script to select only comms with calls.
Committer notes:
Running the export-to-sqlite.py worked without warnings and using the exported-sql-viewer.py worked as before.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
8534b5de | 10-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-postgresql.py: Export comm details
Add table columns for thread id, comm start time and exec flag.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Ols
perf scripts python: export-to-postgresql.py: Export comm details
Add table columns for thread id, comm start time and exec flag.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190710085810.1650-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
1334bb94 | 08-Jul-2019 |
Adrian Hunter <adrian.hunter@intel.com> |
perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view
Drop power_events_view before its dependent tables.
SQLite does not seem to mind but the fix was needed for PostgreSQL (exp
perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view
Drop power_events_view before its dependent tables.
SQLite does not seem to mind but the fix was needed for PostgreSQL (export-to-postgresql.py script), so do the same fix for the SQLite. It is more logical and keeps the 2 scripts following the same approach.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Fixes: 5130c6e55531 ("perf scripts python: export-to-sqlite.py: Export Intel PT power and ptwrite events") Link: http://lkml.kernel.org/r/20190708055232.5032-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|