History

perf script python: Remove mixed indentation

Remove mixed indentation in Python scripts. Revert to either all tabs (most common form) or all spaces (4 or 8) depending on what was the intent of the original commit. This is necessary to complete Python3 support as it will flag an error if it encounters mixed indentation.

Tony Jones committed 7 years ago

Commit b504d7f1 parent c1d3e6314 files · +136 −135Browse files

Showing the changes to tools/perf/scripts/python/event_analyzing_sample.py (1 of 14 files). Show all

Unified · Split

tools/perf/scripts/python/event_analyzing_sample.py+3−3
@@ -37,7 +37,7 @@ con = sqlite3.connect("/dev/shm/perf.db") · 36 unmodified lines
37con.isolation_level = None37con.isolation_level = None
38 38
39def trace_begin():39def trace_begin():
40 print "In trace_begin:\n"40 print "In trace_begin:\n"
41 41
42 #42 #
43 # Will create several tables at the start, pebs_ll is for PEBS data with43 # Will create several tables at the start, pebs_ll is for PEBS data with
@@ -102,7 +102,7 @@ def insert_db(event): · 58 unmodified lines
102 event.ip, event.status, event.dse, event.dla, event.lat))102 event.ip, event.status, event.dse, event.dla, event.lat))
103 103
104def trace_end():104def trace_end():
105 print "In trace_end:\n"105 print "In trace_end:\n"
106 # We show the basic info for the 2 type of event classes106 # We show the basic info for the 2 type of event classes
107 show_general_events()107 show_general_events()
108 show_pebs_ll()108 show_pebs_ll()
@@ -187,4 +187,4 @@ def show_pebs_ll(): · 78 unmodified lines
187 print "%32s %8d %s" % (row[0], row[1], num2sym(row[1]))187 print "%32s %8d %s" % (row[0], row[1], num2sym(row[1]))
188 188
189def trace_unhandled(event_name, context, event_fields_dict):189def trace_unhandled(event_name, context, event_fields_dict):
190 print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])190 print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t