Lines Matching refs:t
207 PyObject *t; in define_value() local
214 t = PyTuple_New(4); in define_value()
215 if (!t) in define_value()
220 PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); in define_value()
221 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); in define_value()
222 PyTuple_SetItem(t, n++, _PyLong_FromLong(value)); in define_value()
223 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_str)); in define_value()
225 try_call_object(handler_name, t); in define_value()
227 Py_DECREF(t); in define_value()
248 PyObject *t; in define_field() local
255 t = PyTuple_New(3); in define_field()
257 t = PyTuple_New(2); in define_field()
258 if (!t) in define_field()
261 PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); in define_field()
262 PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); in define_field()
264 PyTuple_SetItem(t, n++, _PyUnicode_FromString(delim)); in define_field()
266 try_call_object(handler_name, t); in define_field()
268 Py_DECREF(t); in define_field()
625 PyObject *t; in get_sample_value_as_tuple() local
627 t = PyTuple_New(2); in get_sample_value_as_tuple()
628 if (!t) in get_sample_value_as_tuple()
630 PyTuple_SetItem(t, 0, PyLong_FromUnsignedLongLong(value->id)); in get_sample_value_as_tuple()
631 PyTuple_SetItem(t, 1, PyLong_FromUnsignedLongLong(value->value)); in get_sample_value_as_tuple()
632 return t; in get_sample_value_as_tuple()
663 PyObject *t = get_sample_value_as_tuple(&sample->read.group.values[i]); in set_sample_read_in_dict() local
664 PyList_SET_ITEM(values, i, t); in set_sample_read_in_dict()
667 PyObject *t = get_sample_value_as_tuple(&sample->read.one); in set_sample_read_in_dict() local
668 PyList_SET_ITEM(values, 0, t); in set_sample_read_in_dict()
797 PyObject *handler, *context, *t, *obj = NULL, *callchain; in python_process_tracepoint() local
833 t = PyTuple_New(MAX_FIELDS); in python_process_tracepoint()
834 if (!t) in python_process_tracepoint()
846 PyTuple_SetItem(t, n++, _PyUnicode_FromString(handler_name)); in python_process_tracepoint()
847 PyTuple_SetItem(t, n++, context); in python_process_tracepoint()
855 PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); in python_process_tracepoint()
856 PyTuple_SetItem(t, n++, _PyLong_FromLong(s)); in python_process_tracepoint()
857 PyTuple_SetItem(t, n++, _PyLong_FromLong(ns)); in python_process_tracepoint()
858 PyTuple_SetItem(t, n++, _PyLong_FromLong(pid)); in python_process_tracepoint()
859 PyTuple_SetItem(t, n++, _PyUnicode_FromString(comm)); in python_process_tracepoint()
860 PyTuple_SetItem(t, n++, callchain); in python_process_tracepoint()
894 PyTuple_SetItem(t, n++, obj); in python_process_tracepoint()
901 PyTuple_SetItem(t, n++, dict); in python_process_tracepoint()
906 PyTuple_SetItem(t, n++, all_entries_dict); in python_process_tracepoint()
911 if (_PyTuple_Resize(&t, n) == -1) in python_process_tracepoint()
915 call_object(handler, t, handler_name); in python_process_tracepoint()
917 call_object(handler, t, default_handler_name); in python_process_tracepoint()
919 Py_DECREF(t); in python_process_tracepoint()
924 PyObject *t; in tuple_new() local
926 t = PyTuple_New(sz); in tuple_new()
927 if (!t) in tuple_new()
929 return t; in tuple_new()
932 static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) in tuple_set_u64() argument
935 return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); in tuple_set_u64()
938 return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); in tuple_set_u64()
942 static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) in tuple_set_s32() argument
944 return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); in tuple_set_s32()
947 static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) in tuple_set_string() argument
949 return PyTuple_SetItem(t, pos, _PyUnicode_FromString(s)); in tuple_set_string()
952 static int tuple_set_bytes(PyObject *t, unsigned int pos, void *bytes, in tuple_set_bytes() argument
955 return PyTuple_SetItem(t, pos, _PyBytes_FromStringAndSize(bytes, sz)); in tuple_set_bytes()
961 PyObject *t; in python_export_evsel() local
963 t = tuple_new(2); in python_export_evsel()
965 tuple_set_u64(t, 0, evsel->db_id); in python_export_evsel()
966 tuple_set_string(t, 1, perf_evsel__name(evsel)); in python_export_evsel()
968 call_object(tables->evsel_handler, t, "evsel_table"); in python_export_evsel()
970 Py_DECREF(t); in python_export_evsel()
979 PyObject *t; in python_export_machine() local
981 t = tuple_new(3); in python_export_machine()
983 tuple_set_u64(t, 0, machine->db_id); in python_export_machine()
984 tuple_set_s32(t, 1, machine->pid); in python_export_machine()
985 tuple_set_string(t, 2, machine->root_dir ? machine->root_dir : ""); in python_export_machine()
987 call_object(tables->machine_handler, t, "machine_table"); in python_export_machine()
989 Py_DECREF(t); in python_export_machine()
998 PyObject *t; in python_export_thread() local
1000 t = tuple_new(5); in python_export_thread()
1002 tuple_set_u64(t, 0, thread->db_id); in python_export_thread()
1003 tuple_set_u64(t, 1, machine->db_id); in python_export_thread()
1004 tuple_set_u64(t, 2, main_thread_db_id); in python_export_thread()
1005 tuple_set_s32(t, 3, thread->pid_); in python_export_thread()
1006 tuple_set_s32(t, 4, thread->tid); in python_export_thread()
1008 call_object(tables->thread_handler, t, "thread_table"); in python_export_thread()
1010 Py_DECREF(t); in python_export_thread()
1019 PyObject *t; in python_export_comm() local
1021 t = tuple_new(5); in python_export_comm()
1023 tuple_set_u64(t, 0, comm->db_id); in python_export_comm()
1024 tuple_set_string(t, 1, comm__str(comm)); in python_export_comm()
1025 tuple_set_u64(t, 2, thread->db_id); in python_export_comm()
1026 tuple_set_u64(t, 3, comm->start); in python_export_comm()
1027 tuple_set_s32(t, 4, comm->exec); in python_export_comm()
1029 call_object(tables->comm_handler, t, "comm_table"); in python_export_comm()
1031 Py_DECREF(t); in python_export_comm()
1040 PyObject *t; in python_export_comm_thread() local
1042 t = tuple_new(3); in python_export_comm_thread()
1044 tuple_set_u64(t, 0, db_id); in python_export_comm_thread()
1045 tuple_set_u64(t, 1, comm->db_id); in python_export_comm_thread()
1046 tuple_set_u64(t, 2, thread->db_id); in python_export_comm_thread()
1048 call_object(tables->comm_thread_handler, t, "comm_thread_table"); in python_export_comm_thread()
1050 Py_DECREF(t); in python_export_comm_thread()
1060 PyObject *t; in python_export_dso() local
1064 t = tuple_new(5); in python_export_dso()
1066 tuple_set_u64(t, 0, dso->db_id); in python_export_dso()
1067 tuple_set_u64(t, 1, machine->db_id); in python_export_dso()
1068 tuple_set_string(t, 2, dso->short_name); in python_export_dso()
1069 tuple_set_string(t, 3, dso->long_name); in python_export_dso()
1070 tuple_set_string(t, 4, sbuild_id); in python_export_dso()
1072 call_object(tables->dso_handler, t, "dso_table"); in python_export_dso()
1074 Py_DECREF(t); in python_export_dso()
1084 PyObject *t; in python_export_symbol() local
1086 t = tuple_new(6); in python_export_symbol()
1088 tuple_set_u64(t, 0, *sym_db_id); in python_export_symbol()
1089 tuple_set_u64(t, 1, dso->db_id); in python_export_symbol()
1090 tuple_set_u64(t, 2, sym->start); in python_export_symbol()
1091 tuple_set_u64(t, 3, sym->end); in python_export_symbol()
1092 tuple_set_s32(t, 4, sym->binding); in python_export_symbol()
1093 tuple_set_string(t, 5, sym->name); in python_export_symbol()
1095 call_object(tables->symbol_handler, t, "symbol_table"); in python_export_symbol()
1097 Py_DECREF(t); in python_export_symbol()
1106 PyObject *t; in python_export_branch_type() local
1108 t = tuple_new(2); in python_export_branch_type()
1110 tuple_set_s32(t, 0, branch_type); in python_export_branch_type()
1111 tuple_set_string(t, 1, name); in python_export_branch_type()
1113 call_object(tables->branch_type_handler, t, "branch_type_table"); in python_export_branch_type()
1115 Py_DECREF(t); in python_export_branch_type()
1124 PyObject *t; in python_export_sample_table() local
1126 t = tuple_new(24); in python_export_sample_table()
1128 tuple_set_u64(t, 0, es->db_id); in python_export_sample_table()
1129 tuple_set_u64(t, 1, es->evsel->db_id); in python_export_sample_table()
1130 tuple_set_u64(t, 2, es->al->machine->db_id); in python_export_sample_table()
1131 tuple_set_u64(t, 3, es->al->thread->db_id); in python_export_sample_table()
1132 tuple_set_u64(t, 4, es->comm_db_id); in python_export_sample_table()
1133 tuple_set_u64(t, 5, es->dso_db_id); in python_export_sample_table()
1134 tuple_set_u64(t, 6, es->sym_db_id); in python_export_sample_table()
1135 tuple_set_u64(t, 7, es->offset); in python_export_sample_table()
1136 tuple_set_u64(t, 8, es->sample->ip); in python_export_sample_table()
1137 tuple_set_u64(t, 9, es->sample->time); in python_export_sample_table()
1138 tuple_set_s32(t, 10, es->sample->cpu); in python_export_sample_table()
1139 tuple_set_u64(t, 11, es->addr_dso_db_id); in python_export_sample_table()
1140 tuple_set_u64(t, 12, es->addr_sym_db_id); in python_export_sample_table()
1141 tuple_set_u64(t, 13, es->addr_offset); in python_export_sample_table()
1142 tuple_set_u64(t, 14, es->sample->addr); in python_export_sample_table()
1143 tuple_set_u64(t, 15, es->sample->period); in python_export_sample_table()
1144 tuple_set_u64(t, 16, es->sample->weight); in python_export_sample_table()
1145 tuple_set_u64(t, 17, es->sample->transaction); in python_export_sample_table()
1146 tuple_set_u64(t, 18, es->sample->data_src); in python_export_sample_table()
1147 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); in python_export_sample_table()
1148 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); in python_export_sample_table()
1149 tuple_set_u64(t, 21, es->call_path_id); in python_export_sample_table()
1150 tuple_set_u64(t, 22, es->sample->insn_cnt); in python_export_sample_table()
1151 tuple_set_u64(t, 23, es->sample->cyc_cnt); in python_export_sample_table()
1153 call_object(tables->sample_handler, t, "sample_table"); in python_export_sample_table()
1155 Py_DECREF(t); in python_export_sample_table()
1161 PyObject *t; in python_export_synth() local
1163 t = tuple_new(3); in python_export_synth()
1165 tuple_set_u64(t, 0, es->db_id); in python_export_synth()
1166 tuple_set_u64(t, 1, es->evsel->core.attr.config); in python_export_synth()
1167 tuple_set_bytes(t, 2, es->sample->raw_data, es->sample->raw_size); in python_export_synth()
1169 call_object(tables->synth_handler, t, "synth_data"); in python_export_synth()
1171 Py_DECREF(t); in python_export_synth()
1190 PyObject *t; in python_export_call_path() local
1196 t = tuple_new(4); in python_export_call_path()
1198 tuple_set_u64(t, 0, cp->db_id); in python_export_call_path()
1199 tuple_set_u64(t, 1, parent_db_id); in python_export_call_path()
1200 tuple_set_u64(t, 2, sym_db_id); in python_export_call_path()
1201 tuple_set_u64(t, 3, cp->ip); in python_export_call_path()
1203 call_object(tables->call_path_handler, t, "call_path_table"); in python_export_call_path()
1205 Py_DECREF(t); in python_export_call_path()
1215 PyObject *t; in python_export_call_return() local
1217 t = tuple_new(14); in python_export_call_return()
1219 tuple_set_u64(t, 0, cr->db_id); in python_export_call_return()
1220 tuple_set_u64(t, 1, cr->thread->db_id); in python_export_call_return()
1221 tuple_set_u64(t, 2, comm_db_id); in python_export_call_return()
1222 tuple_set_u64(t, 3, cr->cp->db_id); in python_export_call_return()
1223 tuple_set_u64(t, 4, cr->call_time); in python_export_call_return()
1224 tuple_set_u64(t, 5, cr->return_time); in python_export_call_return()
1225 tuple_set_u64(t, 6, cr->branch_count); in python_export_call_return()
1226 tuple_set_u64(t, 7, cr->call_ref); in python_export_call_return()
1227 tuple_set_u64(t, 8, cr->return_ref); in python_export_call_return()
1228 tuple_set_u64(t, 9, cr->cp->parent->db_id); in python_export_call_return()
1229 tuple_set_s32(t, 10, cr->flags); in python_export_call_return()
1230 tuple_set_u64(t, 11, cr->parent_db_id); in python_export_call_return()
1231 tuple_set_u64(t, 12, cr->insn_count); in python_export_call_return()
1232 tuple_set_u64(t, 13, cr->cyc_count); in python_export_call_return()
1234 call_object(tables->call_return_handler, t, "call_return_table"); in python_export_call_return()
1236 Py_DECREF(t); in python_export_call_return()
1248 PyObject *t; in python_export_context_switch() local
1250 t = tuple_new(9); in python_export_context_switch()
1252 tuple_set_u64(t, 0, db_id); in python_export_context_switch()
1253 tuple_set_u64(t, 1, machine->db_id); in python_export_context_switch()
1254 tuple_set_u64(t, 2, sample->time); in python_export_context_switch()
1255 tuple_set_s32(t, 3, sample->cpu); in python_export_context_switch()
1256 tuple_set_u64(t, 4, th_out_id); in python_export_context_switch()
1257 tuple_set_u64(t, 5, comm_out_id); in python_export_context_switch()
1258 tuple_set_u64(t, 6, th_in_id); in python_export_context_switch()
1259 tuple_set_u64(t, 7, comm_in_id); in python_export_context_switch()
1260 tuple_set_s32(t, 8, flags); in python_export_context_switch()
1262 call_object(tables->context_switch_handler, t, "context_switch"); in python_export_context_switch()
1264 Py_DECREF(t); in python_export_context_switch()
1281 PyObject *handler, *t, *dict, *callchain; in python_process_general_event() local
1295 t = PyTuple_New(MAX_FIELDS); in python_process_general_event()
1296 if (!t) in python_process_general_event()
1303 PyTuple_SetItem(t, n++, dict); in python_process_general_event()
1304 if (_PyTuple_Resize(&t, n) == -1) in python_process_general_event()
1307 call_object(handler, t, handler_name); in python_process_general_event()
1309 Py_DECREF(t); in python_process_general_event()
1359 PyObject *handler, *t; in process_stat() local
1363 t = PyTuple_New(MAX_FIELDS); in process_stat()
1364 if (!t) in process_stat()
1376 PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); in process_stat()
1377 PyTuple_SetItem(t, n++, _PyLong_FromLong(thread)); in process_stat()
1379 tuple_set_u64(t, n++, tstamp); in process_stat()
1380 tuple_set_u64(t, n++, count->val); in process_stat()
1381 tuple_set_u64(t, n++, count->ena); in process_stat()
1382 tuple_set_u64(t, n++, count->run); in process_stat()
1384 if (_PyTuple_Resize(&t, n) == -1) in process_stat()
1387 call_object(handler, t, handler_name); in process_stat()
1389 Py_DECREF(t); in process_stat()
1416 PyObject *handler, *t; in python_process_stat_interval() local
1420 t = PyTuple_New(MAX_FIELDS); in python_process_stat_interval()
1421 if (!t) in python_process_stat_interval()
1430 tuple_set_u64(t, n++, tstamp); in python_process_stat_interval()
1432 if (_PyTuple_Resize(&t, n) == -1) in python_process_stat_interval()
1435 call_object(handler, t, handler_name); in python_process_stat_interval()
1437 Py_DECREF(t); in python_process_stat_interval()