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.
Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all
Unified · Split
| @@ -606,6 +606,8 @@ def trace_end(): · 605 unmodified lines | ||
| 606 | 606 | if perf_db_export_calls: |
| 607 | 607 | do_query(query, 'CREATE INDEX pcpid_idx ON calls (parent_call_path_id)') |
| 608 | 608 | do_query(query, 'CREATE INDEX pid_idx ON calls (parent_id)') |
| 609 | + do_query(query, 'ALTER TABLE comms ADD has_calls boolean') | |
| 610 | + do_query(query, 'UPDATE comms SET has_calls = 1 WHERE comms.id IN (SELECT DISTINCT comm_id FROM calls)') | |
| 609 | 611 | |
| 610 | 612 | printdate("Dropping unused tables") |
| 611 | 613 | if is_table_empty("ptwrite"): |