Lines Matching refs:dict

144 static void pydict_set_item_string_decref(PyObject *dict, const char *key, PyObject *val)  in pydict_set_item_string_decref()  argument
146 PyDict_SetItemString(dict, key, val); in pydict_set_item_string_decref()
723 static void set_sample_datasrc_in_dict(PyObject *dict, in set_sample_datasrc_in_dict() argument
732 pydict_set_item_string_decref(dict, "datasrc", in set_sample_datasrc_in_dict()
739 pydict_set_item_string_decref(dict, "datasrc_decode", in set_sample_datasrc_in_dict()
767 static int set_regs_in_dict(PyObject *dict, in set_regs_in_dict() argument
781 pydict_set_item_string_decref(dict, "iregs", in set_regs_in_dict()
786 pydict_set_item_string_decref(dict, "uregs", in set_regs_in_dict()
793 static void set_sym_in_dict(PyObject *dict, struct addr_location *al, in set_sym_in_dict() argument
803 pydict_set_item_string_decref(dict, dso_field, in set_sym_in_dict()
806 pydict_set_item_string_decref(dict, dso_bid_field, in set_sym_in_dict()
808 pydict_set_item_string_decref(dict, dso_map_start, in set_sym_in_dict()
810 pydict_set_item_string_decref(dict, dso_map_end, in set_sym_in_dict()
814 pydict_set_item_string_decref(dict, sym_field, in set_sym_in_dict()
816 pydict_set_item_string_decref(dict, symoff_field, in set_sym_in_dict()
821 static void set_sample_flags(PyObject *dict, u32 flags) in set_sample_flags() argument
831 pydict_set_item_string_decref(dict, "flags", _PyUnicode_FromString(str)); in set_sample_flags()
850 PyObject *dict, *dict_sample, *brstack, *brstacksym; in get_perf_sample_dict() local
852 dict = PyDict_New(); in get_perf_sample_dict()
853 if (!dict) in get_perf_sample_dict()
860 pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(evsel__name(evsel))); in get_perf_sample_dict()
861 …pydict_set_item_string_decref(dict, "attr", _PyBytes_FromStringAndSize((const char *)&evsel->core.… in get_perf_sample_dict()
891 pydict_set_item_string_decref(dict, "sample", dict_sample); in get_perf_sample_dict()
893 pydict_set_item_string_decref(dict, "raw_buf", _PyBytes_FromStringAndSize( in get_perf_sample_dict()
895 pydict_set_item_string_decref(dict, "comm", in get_perf_sample_dict()
897 set_sym_in_dict(dict, al, "dso", "dso_bid", "dso_map_start", "dso_map_end", in get_perf_sample_dict()
900 pydict_set_item_string_decref(dict, "callchain", callchain); in get_perf_sample_dict()
903 pydict_set_item_string_decref(dict, "brstack", brstack); in get_perf_sample_dict()
906 pydict_set_item_string_decref(dict, "brstacksym", brstacksym); in get_perf_sample_dict()
937 if (set_regs_in_dict(dict, sample, evsel)) in get_perf_sample_dict()
940 return dict; in get_perf_sample_dict()
951 PyObject *dict = NULL, *all_entries_dict = NULL; in python_process_tracepoint() local
984 dict = PyDict_New(); in python_process_tracepoint()
985 if (!dict) in python_process_tracepoint()
1007 if (!dict) { in python_process_tracepoint()
1015 pydict_set_item_string_decref(dict, "common_cpu", _PyLong_FromLong(cpu)); in python_process_tracepoint()
1016 pydict_set_item_string_decref(dict, "common_s", _PyLong_FromLong(s)); in python_process_tracepoint()
1017 pydict_set_item_string_decref(dict, "common_ns", _PyLong_FromLong(ns)); in python_process_tracepoint()
1018 pydict_set_item_string_decref(dict, "common_pid", _PyLong_FromLong(pid)); in python_process_tracepoint()
1019 pydict_set_item_string_decref(dict, "common_comm", _PyUnicode_FromString(comm)); in python_process_tracepoint()
1020 pydict_set_item_string_decref(dict, "common_callchain", callchain); in python_process_tracepoint()
1048 if (!dict) in python_process_tracepoint()
1051 pydict_set_item_string_decref(dict, field->name, obj); in python_process_tracepoint()
1055 if (dict) in python_process_tracepoint()
1056 PyTuple_SetItem(t, n++, dict); in python_process_tracepoint()
1069 if (!dict) in python_process_tracepoint()
1477 PyObject *handler, *t, *dict, *callchain; in python_process_general_event() local
1497 dict = get_perf_sample_dict(sample, evsel, al, addr_al, callchain); in python_process_general_event()
1499 PyTuple_SetItem(t, n++, dict); in python_process_general_event()
1750 PyObject *dict; in perf_script_context_init() local
1756 dict = PyModule_GetDict(perf_trace_context); in perf_script_context_init()
1757 if (!dict) in perf_script_context_init()
1764 ret = PyDict_SetItemString(dict, "perf_script_context", perf_script_context); in perf_script_context_init()