Linux Perf
export-to-postgresql.py File Reference

Go to the source code of this file.

Namespaces

 export-to-postgresql
 

Functions

def export-to-postgresql.usage ()
 
def export-to-postgresql.do_query (q, s)
 
def export-to-postgresql.open_output_file (file_name)
 
def export-to-postgresql.close_output_file (file)
 
def export-to-postgresql.copy_output_file_direct (file, table_name)
 
def export-to-postgresql.copy_output_file (file, table_name)
 
def export-to-postgresql.remove_output_file (file)
 
def export-to-postgresql.trace_begin ()
 
def export-to-postgresql.trace_end ()
 
def export-to-postgresql.trace_unhandled (event_name, context, event_fields_dict)
 
def export-to-postgresql.sched__sched_switch (x)
 
def export-to-postgresql.evsel_table (evsel_id, evsel_name, x)
 
def export-to-postgresql.machine_table (machine_id, pid, root_dir, x)
 
def export-to-postgresql.thread_table (thread_id, machine_id, process_id, pid, tid, x)
 
def export-to-postgresql.comm_table (comm_id, comm_str, x)
 
def export-to-postgresql.comm_thread_table (comm_thread_id, comm_id, thread_id, x)
 
def export-to-postgresql.dso_table (dso_id, machine_id, short_name, long_name, build_id, x)
 
def export-to-postgresql.symbol_table (symbol_id, dso_id, sym_start, sym_end, binding, symbol_name, x)
 
def export-to-postgresql.branch_type_table (branch_type, name, x)
 
def export-to-postgresql.sample_table (sample_id, evsel_id, machine_id, thread_id, comm_id, dso_id, symbol_id, sym_offset, ip, time, cpu, to_dso_id, to_symbol_id, to_sym_offset, to_ip, period, weight, transaction, data_src, branch_type, in_tx, call_path_id, x)
 
def export-to-postgresql.call_path_table (cp_id, parent_id, symbol_id, ip, x)
 
def export-to-postgresql.call_return_table (cr_id, thread_id, comm_id, call_path_id, call_time, return_time, branch_count, call_id, return_id, parent_call_path_id, flags, x)
 

Variables

 export-to-postgresql.libpq = CDLL("libpq.so.5")
 
 export-to-postgresql.PQconnectdb = libpq.PQconnectdb
 
 export-to-postgresql.restype
 
 export-to-postgresql.PQfinish = libpq.PQfinish
 
 export-to-postgresql.PQstatus = libpq.PQstatus
 
 export-to-postgresql.PQexec = libpq.PQexec
 
 export-to-postgresql.PQresultStatus = libpq.PQresultStatus
 
 export-to-postgresql.PQputCopyData = libpq.PQputCopyData
 
 export-to-postgresql.argtypes
 
 export-to-postgresql.PQputCopyEnd = libpq.PQputCopyEnd
 
bool export-to-postgresql.perf_db_export_mode = True
 
bool export-to-postgresql.perf_db_export_calls = False
 
bool export-to-postgresql.perf_db_export_callchains = False
 
 export-to-postgresql.dbname = sys.argv[1]
 
 export-to-postgresql.columns = sys.argv[2]
 
tuple export-to-postgresql.branches = (columns == "branches")
 
string export-to-postgresql.output_dir_name = os.getcwd() + "/" + dbname + "-perf-data"
 
 export-to-postgresql.db = QSqlDatabase.addDatabase('QPSQL')
 
 export-to-postgresql.query = QSqlQuery(db)
 
 export-to-postgresql.file_header = struct.pack("!11sii", "PGCOPY\n\377\r\n\0", 0, 0)
 
string export-to-postgresql.file_trailer = "\377\377"
 
def export-to-postgresql.evsel_file = open_output_file("evsel_table.bin")
 
def export-to-postgresql.machine_file = open_output_file("machine_table.bin")
 
def export-to-postgresql.thread_file = open_output_file("thread_table.bin")
 
def export-to-postgresql.comm_file = open_output_file("comm_table.bin")
 
def export-to-postgresql.comm_thread_file = open_output_file("comm_thread_table.bin")
 
def export-to-postgresql.dso_file = open_output_file("dso_table.bin")
 
def export-to-postgresql.symbol_file = open_output_file("symbol_table.bin")
 
def export-to-postgresql.branch_type_file = open_output_file("branch_type_table.bin")
 
def export-to-postgresql.sample_file = open_output_file("sample_table.bin")
 
def export-to-postgresql.call_path_file = open_output_file("call_path_table.bin")
 
def export-to-postgresql.call_file = open_output_file("call_table.bin")
 
int export-to-postgresql.unhandled_count = 0