Lines Matching refs:t
137 PyObject *t; in define_value() local
144 t = PyTuple_New(4); in define_value()
145 if (!t) in define_value()
150 PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); in define_value()
151 PyTuple_SetItem(t, n++, PyString_FromString(field_name)); in define_value()
152 PyTuple_SetItem(t, n++, PyInt_FromLong(value)); in define_value()
153 PyTuple_SetItem(t, n++, PyString_FromString(field_str)); in define_value()
155 try_call_object(handler_name, t); in define_value()
157 Py_DECREF(t); in define_value()
178 PyObject *t; in define_field() local
185 t = PyTuple_New(3); in define_field()
187 t = PyTuple_New(2); in define_field()
188 if (!t) in define_field()
191 PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); in define_field()
192 PyTuple_SetItem(t, n++, PyString_FromString(field_name)); in define_field()
194 PyTuple_SetItem(t, n++, PyString_FromString(delim)); in define_field()
196 try_call_object(handler_name, t); in define_field()
198 Py_DECREF(t); in define_field()
387 PyObject *handler, *context, *t, *obj, *callchain; in python_process_tracepoint() local
399 t = PyTuple_New(MAX_FIELDS); in python_process_tracepoint()
400 if (!t) in python_process_tracepoint()
427 PyTuple_SetItem(t, n++, PyString_FromString(handler_name)); in python_process_tracepoint()
428 PyTuple_SetItem(t, n++, context); in python_process_tracepoint()
434 PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); in python_process_tracepoint()
435 PyTuple_SetItem(t, n++, PyInt_FromLong(s)); in python_process_tracepoint()
436 PyTuple_SetItem(t, n++, PyInt_FromLong(ns)); in python_process_tracepoint()
437 PyTuple_SetItem(t, n++, PyInt_FromLong(pid)); in python_process_tracepoint()
438 PyTuple_SetItem(t, n++, PyString_FromString(comm)); in python_process_tracepoint()
439 PyTuple_SetItem(t, n++, callchain); in python_process_tracepoint()
461 PyTuple_SetItem(t, n++, obj); in python_process_tracepoint()
468 PyTuple_SetItem(t, n++, dict); in python_process_tracepoint()
470 if (_PyTuple_Resize(&t, n) == -1) in python_process_tracepoint()
474 call_object(handler, t, handler_name); in python_process_tracepoint()
476 try_call_object("trace_unhandled", t); in python_process_tracepoint()
480 Py_DECREF(t); in python_process_tracepoint()
485 PyObject *t; in tuple_new() local
487 t = PyTuple_New(sz); in tuple_new()
488 if (!t) in tuple_new()
490 return t; in tuple_new()
493 static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) in tuple_set_u64() argument
496 return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); in tuple_set_u64()
499 return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); in tuple_set_u64()
503 static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) in tuple_set_s32() argument
505 return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); in tuple_set_s32()
508 static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) in tuple_set_string() argument
510 return PyTuple_SetItem(t, pos, PyString_FromString(s)); in tuple_set_string()
516 PyObject *t; in python_export_evsel() local
518 t = tuple_new(2); in python_export_evsel()
520 tuple_set_u64(t, 0, evsel->db_id); in python_export_evsel()
521 tuple_set_string(t, 1, perf_evsel__name(evsel)); in python_export_evsel()
523 call_object(tables->evsel_handler, t, "evsel_table"); in python_export_evsel()
525 Py_DECREF(t); in python_export_evsel()
534 PyObject *t; in python_export_machine() local
536 t = tuple_new(3); in python_export_machine()
538 tuple_set_u64(t, 0, machine->db_id); in python_export_machine()
539 tuple_set_s32(t, 1, machine->pid); in python_export_machine()
540 tuple_set_string(t, 2, machine->root_dir ? machine->root_dir : ""); in python_export_machine()
542 call_object(tables->machine_handler, t, "machine_table"); in python_export_machine()
544 Py_DECREF(t); in python_export_machine()
553 PyObject *t; in python_export_thread() local
555 t = tuple_new(5); in python_export_thread()
557 tuple_set_u64(t, 0, thread->db_id); in python_export_thread()
558 tuple_set_u64(t, 1, machine->db_id); in python_export_thread()
559 tuple_set_u64(t, 2, main_thread_db_id); in python_export_thread()
560 tuple_set_s32(t, 3, thread->pid_); in python_export_thread()
561 tuple_set_s32(t, 4, thread->tid); in python_export_thread()
563 call_object(tables->thread_handler, t, "thread_table"); in python_export_thread()
565 Py_DECREF(t); in python_export_thread()
573 PyObject *t; in python_export_comm() local
575 t = tuple_new(2); in python_export_comm()
577 tuple_set_u64(t, 0, comm->db_id); in python_export_comm()
578 tuple_set_string(t, 1, comm__str(comm)); in python_export_comm()
580 call_object(tables->comm_handler, t, "comm_table"); in python_export_comm()
582 Py_DECREF(t); in python_export_comm()
591 PyObject *t; in python_export_comm_thread() local
593 t = tuple_new(3); in python_export_comm_thread()
595 tuple_set_u64(t, 0, db_id); in python_export_comm_thread()
596 tuple_set_u64(t, 1, comm->db_id); in python_export_comm_thread()
597 tuple_set_u64(t, 2, thread->db_id); in python_export_comm_thread()
599 call_object(tables->comm_thread_handler, t, "comm_thread_table"); in python_export_comm_thread()
601 Py_DECREF(t); in python_export_comm_thread()
611 PyObject *t; in python_export_dso() local
615 t = tuple_new(5); in python_export_dso()
617 tuple_set_u64(t, 0, dso->db_id); in python_export_dso()
618 tuple_set_u64(t, 1, machine->db_id); in python_export_dso()
619 tuple_set_string(t, 2, dso->short_name); in python_export_dso()
620 tuple_set_string(t, 3, dso->long_name); in python_export_dso()
621 tuple_set_string(t, 4, sbuild_id); in python_export_dso()
623 call_object(tables->dso_handler, t, "dso_table"); in python_export_dso()
625 Py_DECREF(t); in python_export_dso()
635 PyObject *t; in python_export_symbol() local
637 t = tuple_new(6); in python_export_symbol()
639 tuple_set_u64(t, 0, *sym_db_id); in python_export_symbol()
640 tuple_set_u64(t, 1, dso->db_id); in python_export_symbol()
641 tuple_set_u64(t, 2, sym->start); in python_export_symbol()
642 tuple_set_u64(t, 3, sym->end); in python_export_symbol()
643 tuple_set_s32(t, 4, sym->binding); in python_export_symbol()
644 tuple_set_string(t, 5, sym->name); in python_export_symbol()
646 call_object(tables->symbol_handler, t, "symbol_table"); in python_export_symbol()
648 Py_DECREF(t); in python_export_symbol()
657 PyObject *t; in python_export_branch_type() local
659 t = tuple_new(2); in python_export_branch_type()
661 tuple_set_s32(t, 0, branch_type); in python_export_branch_type()
662 tuple_set_string(t, 1, name); in python_export_branch_type()
664 call_object(tables->branch_type_handler, t, "branch_type_table"); in python_export_branch_type()
666 Py_DECREF(t); in python_export_branch_type()
675 PyObject *t; in python_export_sample() local
677 t = tuple_new(21); in python_export_sample()
679 tuple_set_u64(t, 0, es->db_id); in python_export_sample()
680 tuple_set_u64(t, 1, es->evsel->db_id); in python_export_sample()
681 tuple_set_u64(t, 2, es->al->machine->db_id); in python_export_sample()
682 tuple_set_u64(t, 3, es->al->thread->db_id); in python_export_sample()
683 tuple_set_u64(t, 4, es->comm_db_id); in python_export_sample()
684 tuple_set_u64(t, 5, es->dso_db_id); in python_export_sample()
685 tuple_set_u64(t, 6, es->sym_db_id); in python_export_sample()
686 tuple_set_u64(t, 7, es->offset); in python_export_sample()
687 tuple_set_u64(t, 8, es->sample->ip); in python_export_sample()
688 tuple_set_u64(t, 9, es->sample->time); in python_export_sample()
689 tuple_set_s32(t, 10, es->sample->cpu); in python_export_sample()
690 tuple_set_u64(t, 11, es->addr_dso_db_id); in python_export_sample()
691 tuple_set_u64(t, 12, es->addr_sym_db_id); in python_export_sample()
692 tuple_set_u64(t, 13, es->addr_offset); in python_export_sample()
693 tuple_set_u64(t, 14, es->sample->addr); in python_export_sample()
694 tuple_set_u64(t, 15, es->sample->period); in python_export_sample()
695 tuple_set_u64(t, 16, es->sample->weight); in python_export_sample()
696 tuple_set_u64(t, 17, es->sample->transaction); in python_export_sample()
697 tuple_set_u64(t, 18, es->sample->data_src); in python_export_sample()
698 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); in python_export_sample()
699 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); in python_export_sample()
701 call_object(tables->sample_handler, t, "sample_table"); in python_export_sample()
703 Py_DECREF(t); in python_export_sample()
711 PyObject *t; in python_export_call_path() local
717 t = tuple_new(4); in python_export_call_path()
719 tuple_set_u64(t, 0, cp->db_id); in python_export_call_path()
720 tuple_set_u64(t, 1, parent_db_id); in python_export_call_path()
721 tuple_set_u64(t, 2, sym_db_id); in python_export_call_path()
722 tuple_set_u64(t, 3, cp->ip); in python_export_call_path()
724 call_object(tables->call_path_handler, t, "call_path_table"); in python_export_call_path()
726 Py_DECREF(t); in python_export_call_path()
736 PyObject *t; in python_export_call_return() local
738 t = tuple_new(11); in python_export_call_return()
740 tuple_set_u64(t, 0, cr->db_id); in python_export_call_return()
741 tuple_set_u64(t, 1, cr->thread->db_id); in python_export_call_return()
742 tuple_set_u64(t, 2, comm_db_id); in python_export_call_return()
743 tuple_set_u64(t, 3, cr->cp->db_id); in python_export_call_return()
744 tuple_set_u64(t, 4, cr->call_time); in python_export_call_return()
745 tuple_set_u64(t, 5, cr->return_time); in python_export_call_return()
746 tuple_set_u64(t, 6, cr->branch_count); in python_export_call_return()
747 tuple_set_u64(t, 7, cr->call_ref); in python_export_call_return()
748 tuple_set_u64(t, 8, cr->return_ref); in python_export_call_return()
749 tuple_set_u64(t, 9, cr->cp->parent->db_id); in python_export_call_return()
750 tuple_set_s32(t, 10, cr->flags); in python_export_call_return()
752 call_object(tables->call_return_handler, t, "call_return_table"); in python_export_call_return()
754 Py_DECREF(t); in python_export_call_return()
770 PyObject *handler, *t, *dict, *callchain, *dict_sample; in python_process_general_event() local
778 t = PyTuple_New(MAX_FIELDS); in python_process_general_event()
779 if (!t) in python_process_general_event()
831 PyTuple_SetItem(t, n++, dict); in python_process_general_event()
832 if (_PyTuple_Resize(&t, n) == -1) in python_process_general_event()
835 call_object(handler, t, handler_name); in python_process_general_event()
838 Py_DECREF(t); in python_process_general_event()