Lines Matching defs:stats
40 PyObject *val = PyLong_FromUnsignedLongLong(stats->field); \
54 stats_to_dict(SpecializationStats *stats)
72 PyObject *stat = PyLong_FromUnsignedLongLong(stats->failure_kinds[i]);
96 SpecializationStats *stats = &_py_stats.opcode_stats[opcode].specialization;
97 PyObject *d = stats_to_dict(stats);
109 PyObject *stats = PyDict_New();
110 if (stats == NULL) {
114 err += add_stat_dict(stats, LOAD_ATTR, "load_attr");
115 err += add_stat_dict(stats, LOAD_GLOBAL, "load_global");
116 err += add_stat_dict(stats, LOAD_METHOD, "load_method");
117 err += add_stat_dict(stats, BINARY_SUBSCR, "binary_subscr");
118 err += add_stat_dict(stats, STORE_SUBSCR, "store_subscr");
119 err += add_stat_dict(stats, STORE_ATTR, "store_attr");
120 err += add_stat_dict(stats, CALL, "call");
121 err += add_stat_dict(stats, BINARY_OP, "binary_op");
122 err += add_stat_dict(stats, COMPARE_OP, "compare_op");
123 err += add_stat_dict(stats, UNPACK_SEQUENCE, "unpack_sequence");
124 err += add_stat_dict(stats, PRECALL, "precall");
126 Py_DECREF(stats);
129 return stats;
135 if (stats[i].field) { \
136 fprintf(out, " opcode[%d]." #field " : %" PRIu64 "\n", i, stats[i].field); \
140 print_spec_stats(FILE *out, OpcodeStats *stats)
142 /* Mark some opcodes as specializable for stats,
157 uint64_t val = stats[i].specialization.failure_kinds[j];
164 if (stats[i].pair_count[j]) {
166 i, j, stats[i].pair_count[j]);
175 print_call_stats(FILE *out, CallStats *stats)
177 fprintf(out, "Calls to PyEval_EvalDefault: %" PRIu64 "\n", stats->pyeval_calls);
178 fprintf(out, "Calls to Python functions inlined: %" PRIu64 "\n", stats->inlined_py_calls);
179 fprintf(out, "Frames pushed: %" PRIu64 "\n", stats->frames_pushed);
180 fprintf(out, "Frame objects created: %" PRIu64 "\n", stats->frame_objects_created);
184 print_object_stats(FILE *out, ObjectStats *stats)
186 fprintf(out, "Object allocations from freelist: %" PRIu64 "\n", stats->from_freelist);
187 fprintf(out, "Object frees to freelist: %" PRIu64 "\n", stats->to_freelist);
188 fprintf(out, "Object allocations: %" PRIu64 "\n", stats->allocations);
189 fprintf(out, "Object allocations to 512 bytes: %" PRIu64 "\n", stats->allocations512);
190 fprintf(out, "Object allocations to 4 kbytes: %" PRIu64 "\n", stats->allocations4k);
191 fprintf(out, "Object allocations over 4 kbytes: %" PRIu64 "\n", stats->allocations_big);
192 fprintf(out, "Object frees: %" PRIu64 "\n", stats->frees);
193 fprintf(out, "Object new values: %" PRIu64 "\n", stats->new_values);
194 fprintf(out, "Object materialize dict (on request): %" PRIu64 "\n", stats->dict_materialized_on_request);
195 fprintf(out, "Object materialize dict (new key): %" PRIu64 "\n", stats->dict_materialized_new_key);
196 fprintf(out, "Object materialize dict (too big): %" PRIu64 "\n", stats->dict_materialized_too_big);
197 fprintf(out, "Object materialize dict (str subclass): %" PRIu64 "\n", stats->dict_materialized_str_subclass);
201 print_stats(FILE *out, PyStats *stats) {
202 print_spec_stats(out, stats->opcode_stats);
203 print_call_stats(out, &stats->call_stats);
204 print_object_stats(out, &stats->object_stats);
238 fprintf(out, "Specialization stats:\n");
917 // Please collect stats carefully before and after modifying. A subtle change
1838 // back to BINARY_OP (unless we're collecting stats, where it's more
1915 // we're collecting stats, where it's more important to get accurate hit