Lines Matching defs:sym
403 static unsigned long get_offset(struct symbol *sym, struct addr_location *al)
407 if (al->addr < sym->end)
408 offset = al->addr - sym->start;
410 offset = al->addr - map__start(al->map) - sym->start;
454 if (node->ms.sym) {
459 PyLong_FromUnsignedLongLong(node->ms.sym->start));
461 PyLong_FromUnsignedLongLong(node->ms.sym->end));
463 _PyLong_FromLong(node->ms.sym->binding));
465 _PyUnicode_FromStringAndSize(node->ms.sym->name,
466 node->ms.sym->namelen));
467 pydict_set_item_string_decref(pyelem, "sym", pysym);
477 offset = get_offset(node->ms.sym, &node_al);
568 static int get_symoff(struct symbol *sym, struct addr_location *al,
573 if (!sym || !sym->name[0])
577 return scnprintf(bf, size, "%s", sym->name);
579 offset = get_offset(sym, al);
581 return scnprintf(bf, size, "%s+0x%x", sym->name, offset);
622 get_symoff(al.sym, &al, true, bf, sizeof(bf));
628 get_symoff(al.sym, &al, true, bf, sizeof(bf));
805 if (al->sym) {
807 _PyUnicode_FromString(al->sym->name));
809 PyLong_FromUnsignedLong(get_offset(al->sym, al)));
1255 static int python_export_symbol(struct db_export *dbe, struct symbol *sym,
1259 u64 *sym_db_id = symbol__priv(sym);
1266 tuple_set_d64(t, 2, sym->start);
1267 tuple_set_d64(t, 3, sym->end);
1268 tuple_set_s32(t, 4, sym->binding);
1269 tuple_set_string(t, 5, sym->name);
1371 sym_db_id = cp->sym ? *(u64 *)symbol__priv(cp->sym) : 0;
2158 fprintf(ofp, "\n\t\t\tif 'sym' in node:");
2160 fprintf(ofp, "\n\t\t\t\t\tnode['ip'], node['sym']['name'],");