Lines Matching refs:t
188 PyObject *t; in define_value() local
195 t = PyTuple_New(4); in define_value()
196 if (!t) in define_value()
201 PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); in define_value()
202 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); in define_value()
203 PyTuple_SetItem(t, n++, _PyLong_FromLong(value)); in define_value()
204 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_str)); in define_value()
206 try_call_object(handler_name, t); in define_value()
208 Py_DECREF(t); in define_value()
229 PyObject *t; in define_field() local
236 t = PyTuple_New(3); in define_field()
238 t = PyTuple_New(2); in define_field()
239 if (!t) in define_field()
242 PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); in define_field()
243 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); in define_field()
245 PyTuple_SetItem(t, n++, _PyUnicode_FromString(delim)); in define_field()
247 try_call_object(handler_name, t); in define_field()
249 Py_DECREF(t); in define_field()
640 PyObject *t; in get_sample_value_as_tuple() local
642 t = PyTuple_New(3); in get_sample_value_as_tuple()
643 if (!t) in get_sample_value_as_tuple()
645 PyTuple_SetItem(t, 0, PyLong_FromUnsignedLongLong(value->id)); in get_sample_value_as_tuple()
646 PyTuple_SetItem(t, 1, PyLong_FromUnsignedLongLong(value->value)); in get_sample_value_as_tuple()
648 PyTuple_SetItem(t, 2, PyLong_FromUnsignedLongLong(value->lost)); in get_sample_value_as_tuple()
650 return t; in get_sample_value_as_tuple()
684 PyObject *t = get_sample_value_as_tuple(v, read_format); in set_sample_read_in_dict() local
685 PyList_SET_ITEM(values, i, t); in set_sample_read_in_dict()
689 PyObject *t = get_sample_value_as_tuple(&sample->read.one, in set_sample_read_in_dict() local
691 PyList_SET_ITEM(values, 0, t); in set_sample_read_in_dict()
936 PyObject *handler, *context, *t, *obj = NULL, *callchain; in python_process_tracepoint() local
976 t = PyTuple_New(MAX_FIELDS); in python_process_tracepoint()
977 if (!t) in python_process_tracepoint()
986 PyTuple_SetItem(t, n++, _PyUnicode_FromString(handler_name)); in python_process_tracepoint()
987 PyTuple_SetItem(t, n++, context); in python_process_tracepoint()
995 PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); in python_process_tracepoint()
996 PyTuple_SetItem(t, n++, _PyLong_FromLong(s)); in python_process_tracepoint()
997 PyTuple_SetItem(t, n++, _PyLong_FromLong(ns)); in python_process_tracepoint()
998 PyTuple_SetItem(t, n++, _PyLong_FromLong(pid)); in python_process_tracepoint()
999 PyTuple_SetItem(t, n++, _PyUnicode_FromString(comm)); in python_process_tracepoint()
1000 PyTuple_SetItem(t, n++, callchain); in python_process_tracepoint()
1036 PyTuple_SetItem(t, n++, obj); in python_process_tracepoint()
1043 PyTuple_SetItem(t, n++, dict); in python_process_tracepoint()
1048 PyTuple_SetItem(t, n++, all_entries_dict); in python_process_tracepoint()
1053 if (_PyTuple_Resize(&t, n) == -1) in python_process_tracepoint()
1057 call_object(handler, t, handler_name); in python_process_tracepoint()
1059 call_object(handler, t, default_handler_name); in python_process_tracepoint()
1061 Py_DECREF(t); in python_process_tracepoint()
1076 PyObject *t; in tuple_new() local
1078 t = PyTuple_New(sz); in tuple_new()
1079 if (!t) in tuple_new()
1081 return t; in tuple_new()
1084 static int tuple_set_s64(PyObject *t, unsigned int pos, s64 val) in tuple_set_s64() argument
1087 return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); in tuple_set_s64()
1090 return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); in tuple_set_s64()
1100 static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) in tuple_set_u64() argument
1103 return PyTuple_SetItem(t, pos, PyLong_FromUnsignedLong(val)); in tuple_set_u64()
1106 return PyTuple_SetItem(t, pos, PyLong_FromUnsignedLongLong(val)); in tuple_set_u64()
1110 static int tuple_set_u32(PyObject *t, unsigned int pos, u32 val) in tuple_set_u32() argument
1112 return PyTuple_SetItem(t, pos, PyLong_FromUnsignedLong(val)); in tuple_set_u32()
1115 static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) in tuple_set_s32() argument
1117 return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); in tuple_set_s32()
1120 static int tuple_set_bool(PyObject *t, unsigned int pos, bool val) in tuple_set_bool() argument
1122 return PyTuple_SetItem(t, pos, PyBool_FromLong(val)); in tuple_set_bool()
1125 static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) in tuple_set_string() argument
1127 return PyTuple_SetItem(t, pos, _PyUnicode_FromString(s)); in tuple_set_string()
1130 static int tuple_set_bytes(PyObject *t, unsigned int pos, void *bytes, in tuple_set_bytes() argument
1133 return PyTuple_SetItem(t, pos, _PyBytes_FromStringAndSize(bytes, sz)); in tuple_set_bytes()
1139 PyObject *t; in python_export_evsel() local
1141 t = tuple_new(2); in python_export_evsel()
1143 tuple_set_d64(t, 0, evsel->db_id); in python_export_evsel()
1144 tuple_set_string(t, 1, evsel__name(evsel)); in python_export_evsel()
1146 call_object(tables->evsel_handler, t, "evsel_table"); in python_export_evsel()
1148 Py_DECREF(t); in python_export_evsel()
1157 PyObject *t; in python_export_machine() local
1159 t = tuple_new(3); in python_export_machine()
1161 tuple_set_d64(t, 0, machine->db_id); in python_export_machine()
1162 tuple_set_s32(t, 1, machine->pid); in python_export_machine()
1163 tuple_set_string(t, 2, machine->root_dir ? machine->root_dir : ""); in python_export_machine()
1165 call_object(tables->machine_handler, t, "machine_table"); in python_export_machine()
1167 Py_DECREF(t); in python_export_machine()
1176 PyObject *t; in python_export_thread() local
1178 t = tuple_new(5); in python_export_thread()
1180 tuple_set_d64(t, 0, thread__db_id(thread)); in python_export_thread()
1181 tuple_set_d64(t, 1, machine->db_id); in python_export_thread()
1182 tuple_set_d64(t, 2, main_thread_db_id); in python_export_thread()
1183 tuple_set_s32(t, 3, thread__pid(thread)); in python_export_thread()
1184 tuple_set_s32(t, 4, thread__tid(thread)); in python_export_thread()
1186 call_object(tables->thread_handler, t, "thread_table"); in python_export_thread()
1188 Py_DECREF(t); in python_export_thread()
1197 PyObject *t; in python_export_comm() local
1199 t = tuple_new(5); in python_export_comm()
1201 tuple_set_d64(t, 0, comm->db_id); in python_export_comm()
1202 tuple_set_string(t, 1, comm__str(comm)); in python_export_comm()
1203 tuple_set_d64(t, 2, thread__db_id(thread)); in python_export_comm()
1204 tuple_set_d64(t, 3, comm->start); in python_export_comm()
1205 tuple_set_s32(t, 4, comm->exec); in python_export_comm()
1207 call_object(tables->comm_handler, t, "comm_table"); in python_export_comm()
1209 Py_DECREF(t); in python_export_comm()
1218 PyObject *t; in python_export_comm_thread() local
1220 t = tuple_new(3); in python_export_comm_thread()
1222 tuple_set_d64(t, 0, db_id); in python_export_comm_thread()
1223 tuple_set_d64(t, 1, comm->db_id); in python_export_comm_thread()
1224 tuple_set_d64(t, 2, thread__db_id(thread)); in python_export_comm_thread()
1226 call_object(tables->comm_thread_handler, t, "comm_thread_table"); in python_export_comm_thread()
1228 Py_DECREF(t); in python_export_comm_thread()
1238 PyObject *t; in python_export_dso() local
1242 t = tuple_new(5); in python_export_dso()
1244 tuple_set_d64(t, 0, dso__db_id(dso)); in python_export_dso()
1245 tuple_set_d64(t, 1, machine->db_id); in python_export_dso()
1246 tuple_set_string(t, 2, dso__short_name(dso)); in python_export_dso()
1247 tuple_set_string(t, 3, dso__long_name(dso)); in python_export_dso()
1248 tuple_set_string(t, 4, sbuild_id); in python_export_dso()
1250 call_object(tables->dso_handler, t, "dso_table"); in python_export_dso()
1252 Py_DECREF(t); in python_export_dso()
1262 PyObject *t; in python_export_symbol() local
1264 t = tuple_new(6); in python_export_symbol()
1266 tuple_set_d64(t, 0, *sym_db_id); in python_export_symbol()
1267 tuple_set_d64(t, 1, dso__db_id(dso)); in python_export_symbol()
1268 tuple_set_d64(t, 2, sym->start); in python_export_symbol()
1269 tuple_set_d64(t, 3, sym->end); in python_export_symbol()
1270 tuple_set_s32(t, 4, sym->binding); in python_export_symbol()
1271 tuple_set_string(t, 5, sym->name); in python_export_symbol()
1273 call_object(tables->symbol_handler, t, "symbol_table"); in python_export_symbol()
1275 Py_DECREF(t); in python_export_symbol()
1284 PyObject *t; in python_export_branch_type() local
1286 t = tuple_new(2); in python_export_branch_type()
1288 tuple_set_s32(t, 0, branch_type); in python_export_branch_type()
1289 tuple_set_string(t, 1, name); in python_export_branch_type()
1291 call_object(tables->branch_type_handler, t, "branch_type_table"); in python_export_branch_type()
1293 Py_DECREF(t); in python_export_branch_type()
1302 PyObject *t; in python_export_sample_table() local
1304 t = tuple_new(28); in python_export_sample_table()
1306 tuple_set_d64(t, 0, es->db_id); in python_export_sample_table()
1307 tuple_set_d64(t, 1, es->evsel->db_id); in python_export_sample_table()
1308 tuple_set_d64(t, 2, maps__machine(thread__maps(es->al->thread))->db_id); in python_export_sample_table()
1309 tuple_set_d64(t, 3, thread__db_id(es->al->thread)); in python_export_sample_table()
1310 tuple_set_d64(t, 4, es->comm_db_id); in python_export_sample_table()
1311 tuple_set_d64(t, 5, es->dso_db_id); in python_export_sample_table()
1312 tuple_set_d64(t, 6, es->sym_db_id); in python_export_sample_table()
1313 tuple_set_d64(t, 7, es->offset); in python_export_sample_table()
1314 tuple_set_d64(t, 8, es->sample->ip); in python_export_sample_table()
1315 tuple_set_d64(t, 9, es->sample->time); in python_export_sample_table()
1316 tuple_set_s32(t, 10, es->sample->cpu); in python_export_sample_table()
1317 tuple_set_d64(t, 11, es->addr_dso_db_id); in python_export_sample_table()
1318 tuple_set_d64(t, 12, es->addr_sym_db_id); in python_export_sample_table()
1319 tuple_set_d64(t, 13, es->addr_offset); in python_export_sample_table()
1320 tuple_set_d64(t, 14, es->sample->addr); in python_export_sample_table()
1321 tuple_set_d64(t, 15, es->sample->period); in python_export_sample_table()
1322 tuple_set_d64(t, 16, es->sample->weight); in python_export_sample_table()
1323 tuple_set_d64(t, 17, es->sample->transaction); in python_export_sample_table()
1324 tuple_set_d64(t, 18, es->sample->data_src); in python_export_sample_table()
1325 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); in python_export_sample_table()
1326 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); in python_export_sample_table()
1327 tuple_set_d64(t, 21, es->call_path_id); in python_export_sample_table()
1328 tuple_set_d64(t, 22, es->sample->insn_cnt); in python_export_sample_table()
1329 tuple_set_d64(t, 23, es->sample->cyc_cnt); in python_export_sample_table()
1330 tuple_set_s32(t, 24, es->sample->flags); in python_export_sample_table()
1331 tuple_set_d64(t, 25, es->sample->id); in python_export_sample_table()
1332 tuple_set_d64(t, 26, es->sample->stream_id); in python_export_sample_table()
1333 tuple_set_u32(t, 27, es->sample->ins_lat); in python_export_sample_table()
1335 call_object(tables->sample_handler, t, "sample_table"); in python_export_sample_table()
1337 Py_DECREF(t); in python_export_sample_table()
1343 PyObject *t; in python_export_synth() local
1345 t = tuple_new(3); in python_export_synth()
1347 tuple_set_d64(t, 0, es->db_id); in python_export_synth()
1348 tuple_set_d64(t, 1, es->evsel->core.attr.config); in python_export_synth()
1349 tuple_set_bytes(t, 2, es->sample->raw_data, es->sample->raw_size); in python_export_synth()
1351 call_object(tables->synth_handler, t, "synth_data"); in python_export_synth()
1353 Py_DECREF(t); in python_export_synth()
1372 PyObject *t; in python_export_call_path() local
1378 t = tuple_new(4); in python_export_call_path()
1380 tuple_set_d64(t, 0, cp->db_id); in python_export_call_path()
1381 tuple_set_d64(t, 1, parent_db_id); in python_export_call_path()
1382 tuple_set_d64(t, 2, sym_db_id); in python_export_call_path()
1383 tuple_set_d64(t, 3, cp->ip); in python_export_call_path()
1385 call_object(tables->call_path_handler, t, "call_path_table"); in python_export_call_path()
1387 Py_DECREF(t); in python_export_call_path()
1397 PyObject *t; in python_export_call_return() local
1399 t = tuple_new(14); in python_export_call_return()
1401 tuple_set_d64(t, 0, cr->db_id); in python_export_call_return()
1402 tuple_set_d64(t, 1, thread__db_id(cr->thread)); in python_export_call_return()
1403 tuple_set_d64(t, 2, comm_db_id); in python_export_call_return()
1404 tuple_set_d64(t, 3, cr->cp->db_id); in python_export_call_return()
1405 tuple_set_d64(t, 4, cr->call_time); in python_export_call_return()
1406 tuple_set_d64(t, 5, cr->return_time); in python_export_call_return()
1407 tuple_set_d64(t, 6, cr->branch_count); in python_export_call_return()
1408 tuple_set_d64(t, 7, cr->call_ref); in python_export_call_return()
1409 tuple_set_d64(t, 8, cr->return_ref); in python_export_call_return()
1410 tuple_set_d64(t, 9, cr->cp->parent->db_id); in python_export_call_return()
1411 tuple_set_s32(t, 10, cr->flags); in python_export_call_return()
1412 tuple_set_d64(t, 11, cr->parent_db_id); in python_export_call_return()
1413 tuple_set_d64(t, 12, cr->insn_count); in python_export_call_return()
1414 tuple_set_d64(t, 13, cr->cyc_count); in python_export_call_return()
1416 call_object(tables->call_return_handler, t, "call_return_table"); in python_export_call_return()
1418 Py_DECREF(t); in python_export_call_return()
1430 PyObject *t; in python_export_context_switch() local
1432 t = tuple_new(9); in python_export_context_switch()
1434 tuple_set_d64(t, 0, db_id); in python_export_context_switch()
1435 tuple_set_d64(t, 1, machine->db_id); in python_export_context_switch()
1436 tuple_set_d64(t, 2, sample->time); in python_export_context_switch()
1437 tuple_set_s32(t, 3, sample->cpu); in python_export_context_switch()
1438 tuple_set_d64(t, 4, th_out_id); in python_export_context_switch()
1439 tuple_set_d64(t, 5, comm_out_id); in python_export_context_switch()
1440 tuple_set_d64(t, 6, th_in_id); in python_export_context_switch()
1441 tuple_set_d64(t, 7, comm_in_id); in python_export_context_switch()
1442 tuple_set_s32(t, 8, flags); in python_export_context_switch()
1444 call_object(tables->context_switch_handler, t, "context_switch"); in python_export_context_switch()
1446 Py_DECREF(t); in python_export_context_switch()
1464 PyObject *handler, *t, *dict, *callchain; in python_process_general_event() local
1478 t = PyTuple_New(MAX_FIELDS); in python_process_general_event()
1479 if (!t) in python_process_general_event()
1486 PyTuple_SetItem(t, n++, dict); in python_process_general_event()
1487 if (_PyTuple_Resize(&t, n) == -1) in python_process_general_event()
1490 call_object(handler, t, handler_name); in python_process_general_event()
1492 Py_DECREF(t); in python_process_general_event()
1523 PyObject *handler, *t; in python_process_throttle() local
1533 t = tuple_new(6); in python_process_throttle()
1534 if (!t) in python_process_throttle()
1537 tuple_set_u64(t, 0, event->throttle.time); in python_process_throttle()
1538 tuple_set_u64(t, 1, event->throttle.id); in python_process_throttle()
1539 tuple_set_u64(t, 2, event->throttle.stream_id); in python_process_throttle()
1540 tuple_set_s32(t, 3, sample->cpu); in python_process_throttle()
1541 tuple_set_s32(t, 4, sample->pid); in python_process_throttle()
1542 tuple_set_s32(t, 5, sample->tid); in python_process_throttle()
1544 call_object(handler, t, handler_name); in python_process_throttle()
1546 Py_DECREF(t); in python_process_throttle()
1557 PyObject *handler, *t; in python_do_process_switch() local
1568 t = tuple_new(11); in python_do_process_switch()
1569 if (!t) in python_do_process_switch()
1572 tuple_set_u64(t, 0, sample->time); in python_do_process_switch()
1573 tuple_set_s32(t, 1, sample->cpu); in python_do_process_switch()
1574 tuple_set_s32(t, 2, sample->pid); in python_do_process_switch()
1575 tuple_set_s32(t, 3, sample->tid); in python_do_process_switch()
1576 tuple_set_s32(t, 4, np_pid); in python_do_process_switch()
1577 tuple_set_s32(t, 5, np_tid); in python_do_process_switch()
1578 tuple_set_s32(t, 6, machine->pid); in python_do_process_switch()
1579 tuple_set_bool(t, 7, out); in python_do_process_switch()
1580 tuple_set_bool(t, 8, out_preempt); in python_do_process_switch()
1581 tuple_set_s32(t, 9, sample->machine_pid); in python_do_process_switch()
1582 tuple_set_s32(t, 10, sample->vcpu); in python_do_process_switch()
1584 call_object(handler, t, handler_name); in python_do_process_switch()
1586 Py_DECREF(t); in python_do_process_switch()
1609 PyObject *handler, *t; in python_process_auxtrace_error() local
1620 t = tuple_new(11); in python_process_auxtrace_error()
1622 tuple_set_u32(t, 0, e->type); in python_process_auxtrace_error()
1623 tuple_set_u32(t, 1, e->code); in python_process_auxtrace_error()
1624 tuple_set_s32(t, 2, e->cpu); in python_process_auxtrace_error()
1625 tuple_set_s32(t, 3, e->pid); in python_process_auxtrace_error()
1626 tuple_set_s32(t, 4, e->tid); in python_process_auxtrace_error()
1627 tuple_set_u64(t, 5, e->ip); in python_process_auxtrace_error()
1628 tuple_set_u64(t, 6, tm); in python_process_auxtrace_error()
1629 tuple_set_string(t, 7, msg); in python_process_auxtrace_error()
1630 tuple_set_u32(t, 8, cpumode); in python_process_auxtrace_error()
1631 tuple_set_s32(t, 9, e->machine_pid); in python_process_auxtrace_error()
1632 tuple_set_s32(t, 10, e->vcpu); in python_process_auxtrace_error()
1634 call_object(handler, t, handler_name); in python_process_auxtrace_error()
1636 Py_DECREF(t); in python_process_auxtrace_error()
1656 PyObject *handler, *t; in process_stat() local
1660 t = PyTuple_New(MAX_FIELDS); in process_stat()
1661 if (!t) in process_stat()
1673 PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu.cpu)); in process_stat()
1674 PyTuple_SetItem(t, n++, _PyLong_FromLong(thread)); in process_stat()
1676 tuple_set_u64(t, n++, tstamp); in process_stat()
1677 tuple_set_u64(t, n++, count->val); in process_stat()
1678 tuple_set_u64(t, n++, count->ena); in process_stat()
1679 tuple_set_u64(t, n++, count->run); in process_stat()
1681 if (_PyTuple_Resize(&t, n) == -1) in process_stat()
1684 call_object(handler, t, handler_name); in process_stat()
1686 Py_DECREF(t); in process_stat()
1709 PyObject *handler, *t; in python_process_stat_interval() local
1713 t = PyTuple_New(MAX_FIELDS); in python_process_stat_interval()
1714 if (!t) in python_process_stat_interval()
1723 tuple_set_u64(t, n++, tstamp); in python_process_stat_interval()
1725 if (_PyTuple_Resize(&t, n) == -1) in python_process_stat_interval()
1728 call_object(handler, t, handler_name); in python_process_stat_interval()
1730 Py_DECREF(t); in python_process_stat_interval()