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()
388 PyObject *handler, *context, *t, *obj, *callchain; in python_process_tracepoint() local
400 t = PyTuple_New(MAX_FIELDS); in python_process_tracepoint()
401 if (!t) in python_process_tracepoint()
428 PyTuple_SetItem(t, n++, PyString_FromString(handler_name)); in python_process_tracepoint()
429 PyTuple_SetItem(t, n++, context); in python_process_tracepoint()
435 PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); in python_process_tracepoint()
436 PyTuple_SetItem(t, n++, PyInt_FromLong(s)); in python_process_tracepoint()
437 PyTuple_SetItem(t, n++, PyInt_FromLong(ns)); in python_process_tracepoint()
438 PyTuple_SetItem(t, n++, PyInt_FromLong(pid)); in python_process_tracepoint()
439 PyTuple_SetItem(t, n++, PyString_FromString(comm)); in python_process_tracepoint()
440 PyTuple_SetItem(t, n++, callchain); in python_process_tracepoint()
462 PyTuple_SetItem(t, n++, obj); in python_process_tracepoint()
469 PyTuple_SetItem(t, n++, dict); in python_process_tracepoint()
471 if (_PyTuple_Resize(&t, n) == -1) in python_process_tracepoint()
475 call_object(handler, t, handler_name); in python_process_tracepoint()
477 try_call_object("trace_unhandled", t); in python_process_tracepoint()
481 Py_DECREF(t); in python_process_tracepoint()
486 PyObject *t; in tuple_new() local
488 t = PyTuple_New(sz); in tuple_new()
489 if (!t) in tuple_new()
491 return t; in tuple_new()
494 static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) in tuple_set_u64() argument
497 return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); in tuple_set_u64()
500 return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); in tuple_set_u64()
504 static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) in tuple_set_s32() argument
506 return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); in tuple_set_s32()
509 static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) in tuple_set_string() argument
511 return PyTuple_SetItem(t, pos, PyString_FromString(s)); in tuple_set_string()
517 PyObject *t; in python_export_evsel() local
519 t = tuple_new(2); in python_export_evsel()
521 tuple_set_u64(t, 0, evsel->db_id); in python_export_evsel()
522 tuple_set_string(t, 1, perf_evsel__name(evsel)); in python_export_evsel()
524 call_object(tables->evsel_handler, t, "evsel_table"); in python_export_evsel()
526 Py_DECREF(t); in python_export_evsel()
535 PyObject *t; in python_export_machine() local
537 t = tuple_new(3); in python_export_machine()
539 tuple_set_u64(t, 0, machine->db_id); in python_export_machine()
540 tuple_set_s32(t, 1, machine->pid); in python_export_machine()
541 tuple_set_string(t, 2, machine->root_dir ? machine->root_dir : ""); in python_export_machine()
543 call_object(tables->machine_handler, t, "machine_table"); in python_export_machine()
545 Py_DECREF(t); in python_export_machine()
554 PyObject *t; in python_export_thread() local
556 t = tuple_new(5); in python_export_thread()
558 tuple_set_u64(t, 0, thread->db_id); in python_export_thread()
559 tuple_set_u64(t, 1, machine->db_id); in python_export_thread()
560 tuple_set_u64(t, 2, main_thread_db_id); in python_export_thread()
561 tuple_set_s32(t, 3, thread->pid_); in python_export_thread()
562 tuple_set_s32(t, 4, thread->tid); in python_export_thread()
564 call_object(tables->thread_handler, t, "thread_table"); in python_export_thread()
566 Py_DECREF(t); in python_export_thread()
574 PyObject *t; in python_export_comm() local
576 t = tuple_new(2); in python_export_comm()
578 tuple_set_u64(t, 0, comm->db_id); in python_export_comm()
579 tuple_set_string(t, 1, comm__str(comm)); in python_export_comm()
581 call_object(tables->comm_handler, t, "comm_table"); in python_export_comm()
583 Py_DECREF(t); in python_export_comm()
592 PyObject *t; in python_export_comm_thread() local
594 t = tuple_new(3); in python_export_comm_thread()
596 tuple_set_u64(t, 0, db_id); in python_export_comm_thread()
597 tuple_set_u64(t, 1, comm->db_id); in python_export_comm_thread()
598 tuple_set_u64(t, 2, thread->db_id); in python_export_comm_thread()
600 call_object(tables->comm_thread_handler, t, "comm_thread_table"); in python_export_comm_thread()
602 Py_DECREF(t); in python_export_comm_thread()
612 PyObject *t; in python_export_dso() local
616 t = tuple_new(5); in python_export_dso()
618 tuple_set_u64(t, 0, dso->db_id); in python_export_dso()
619 tuple_set_u64(t, 1, machine->db_id); in python_export_dso()
620 tuple_set_string(t, 2, dso->short_name); in python_export_dso()
621 tuple_set_string(t, 3, dso->long_name); in python_export_dso()
622 tuple_set_string(t, 4, sbuild_id); in python_export_dso()
624 call_object(tables->dso_handler, t, "dso_table"); in python_export_dso()
626 Py_DECREF(t); in python_export_dso()
636 PyObject *t; in python_export_symbol() local
638 t = tuple_new(6); in python_export_symbol()
640 tuple_set_u64(t, 0, *sym_db_id); in python_export_symbol()
641 tuple_set_u64(t, 1, dso->db_id); in python_export_symbol()
642 tuple_set_u64(t, 2, sym->start); in python_export_symbol()
643 tuple_set_u64(t, 3, sym->end); in python_export_symbol()
644 tuple_set_s32(t, 4, sym->binding); in python_export_symbol()
645 tuple_set_string(t, 5, sym->name); in python_export_symbol()
647 call_object(tables->symbol_handler, t, "symbol_table"); in python_export_symbol()
649 Py_DECREF(t); in python_export_symbol()
658 PyObject *t; in python_export_branch_type() local
660 t = tuple_new(2); in python_export_branch_type()
662 tuple_set_s32(t, 0, branch_type); in python_export_branch_type()
663 tuple_set_string(t, 1, name); in python_export_branch_type()
665 call_object(tables->branch_type_handler, t, "branch_type_table"); in python_export_branch_type()
667 Py_DECREF(t); in python_export_branch_type()
676 PyObject *t; in python_export_sample() local
678 t = tuple_new(21); in python_export_sample()
680 tuple_set_u64(t, 0, es->db_id); in python_export_sample()
681 tuple_set_u64(t, 1, es->evsel->db_id); in python_export_sample()
682 tuple_set_u64(t, 2, es->al->machine->db_id); in python_export_sample()
683 tuple_set_u64(t, 3, es->al->thread->db_id); in python_export_sample()
684 tuple_set_u64(t, 4, es->comm_db_id); in python_export_sample()
685 tuple_set_u64(t, 5, es->dso_db_id); in python_export_sample()
686 tuple_set_u64(t, 6, es->sym_db_id); in python_export_sample()
687 tuple_set_u64(t, 7, es->offset); in python_export_sample()
688 tuple_set_u64(t, 8, es->sample->ip); in python_export_sample()
689 tuple_set_u64(t, 9, es->sample->time); in python_export_sample()
690 tuple_set_s32(t, 10, es->sample->cpu); in python_export_sample()
691 tuple_set_u64(t, 11, es->addr_dso_db_id); in python_export_sample()
692 tuple_set_u64(t, 12, es->addr_sym_db_id); in python_export_sample()
693 tuple_set_u64(t, 13, es->addr_offset); in python_export_sample()
694 tuple_set_u64(t, 14, es->sample->addr); in python_export_sample()
695 tuple_set_u64(t, 15, es->sample->period); in python_export_sample()
696 tuple_set_u64(t, 16, es->sample->weight); in python_export_sample()
697 tuple_set_u64(t, 17, es->sample->transaction); in python_export_sample()
698 tuple_set_u64(t, 18, es->sample->data_src); in python_export_sample()
699 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); in python_export_sample()
700 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); in python_export_sample()
702 call_object(tables->sample_handler, t, "sample_table"); in python_export_sample()
704 Py_DECREF(t); in python_export_sample()
712 PyObject *t; in python_export_call_path() local
718 t = tuple_new(4); in python_export_call_path()
720 tuple_set_u64(t, 0, cp->db_id); in python_export_call_path()
721 tuple_set_u64(t, 1, parent_db_id); in python_export_call_path()
722 tuple_set_u64(t, 2, sym_db_id); in python_export_call_path()
723 tuple_set_u64(t, 3, cp->ip); in python_export_call_path()
725 call_object(tables->call_path_handler, t, "call_path_table"); in python_export_call_path()
727 Py_DECREF(t); in python_export_call_path()
737 PyObject *t; in python_export_call_return() local
739 t = tuple_new(11); in python_export_call_return()
741 tuple_set_u64(t, 0, cr->db_id); in python_export_call_return()
742 tuple_set_u64(t, 1, cr->thread->db_id); in python_export_call_return()
743 tuple_set_u64(t, 2, comm_db_id); in python_export_call_return()
744 tuple_set_u64(t, 3, cr->cp->db_id); in python_export_call_return()
745 tuple_set_u64(t, 4, cr->call_time); in python_export_call_return()
746 tuple_set_u64(t, 5, cr->return_time); in python_export_call_return()
747 tuple_set_u64(t, 6, cr->branch_count); in python_export_call_return()
748 tuple_set_u64(t, 7, cr->call_ref); in python_export_call_return()
749 tuple_set_u64(t, 8, cr->return_ref); in python_export_call_return()
750 tuple_set_u64(t, 9, cr->cp->parent->db_id); in python_export_call_return()
751 tuple_set_s32(t, 10, cr->flags); in python_export_call_return()
753 call_object(tables->call_return_handler, t, "call_return_table"); in python_export_call_return()
755 Py_DECREF(t); in python_export_call_return()
771 PyObject *handler, *t, *dict, *callchain, *dict_sample; in python_process_general_event() local
779 t = PyTuple_New(MAX_FIELDS); in python_process_general_event()
780 if (!t) in python_process_general_event()
832 PyTuple_SetItem(t, n++, dict); in python_process_general_event()
833 if (_PyTuple_Resize(&t, n) == -1) in python_process_general_event()
836 call_object(handler, t, handler_name); in python_process_general_event()
839 Py_DECREF(t); in python_process_general_event()