Esempio n. 1
0
        // remeber type and roots
        protected override void VisitType(int id, string name)
        {
            GcType type = new GcType(id, name);

            this.types.Add(type.ID, type);
            this.graph.AddVertex(type);
        }
Esempio n. 2
0
        private void AddTypeEdge(GcType source, GcType target)
        {
            GcTypeEdge edge;

            if (!this.graph.TryGetEdge(source, target, out edge))
            {
                this.graph.AddEdge(edge = new GcTypeEdge(source, target));
            }
            edge.Count++;
        }
Esempio n. 3
0
 private void FlushUnresolvedMembers()
 {
     foreach (GcMember member in this.unresolvedMembers)
     {
         GcType target = member.Referer;
         GcType source;
         if (this.objectTypes.TryGetValue(member.Address, out source))
         {
             this.AddTypeEdge(source, target);
         }
     }
     this.unresolvedMembers.Clear();
 }
Esempio n. 4
0
        public GcObjectVertex AddVertex(
            GcType type,
            long address,
            int size
            )
        {
            GcObjectVertex v = new GcObjectVertex(
                type,
                address,
                size);

            this.AddVertex(v);
            return(v);
        }
Esempio n. 5
0
 public GcObjectVertex(
     GcType type,
     long address,
     int size,
     string kind,
     int gen,
     string value
     )
 {
     this.type    = type;
     this.address = address;
     this.size    = size;
     this.kind    = kind;
     this.gen     = gen;
     this.value   = value;
 }
Esempio n. 6
0
 public GcMember(GcType referer, int address)
 {
     this.Referer = referer;
     this.Address = address;
 }