[DynInst_API:] [dyninst/dyninst] e94542: More fixes for removing duplicated edges and wrong...


Date: Tue, 02 Oct 2018 10:07:07 -0700
From: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] e94542: More fixes for removing duplicated edges and wrong...
  Branch: refs/heads/new-parallel-parsing
  Home:   https://github.com/dyninst/dyninst
  Commit: e94542723fb7cb4b613813d854cd58bf27d49059
      https://github.com/dyninst/dyninst/commit/e94542723fb7cb4b613813d854cd58bf27d49059
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2018-10-02 (Tue, 02 Oct 2018)

  Changed paths:
    M parseAPI/src/ParseData.h
    M parseAPI/src/Parser.C
    M parseAPI/src/Parser.h

  Log Message:
  -----------
  More fixes for removing duplicated edges and wrong edges.

1. A thread may attempt to parse an address for edges multiple times
   when there are overlapping instructions. Handle this case to ensure
   that each address is parsed for edges once. This fix remove duplicated
   edges.

2. Fix moving edges during block split, which caused wrong edges.
   The block split during parsing and the consistent block split
   during finalizing should use the same algorithm described below:

     * We move outgoing edges from block A to block B, which is
     * necessary when spliting blocks.
     * The start of block B should be consistent with block A.
     * There are three cases:
     *
     * Case 1: the end of A and B are the same
     *         A :  [     ]
     *         B :     [  ]
     *         In such case, we can directly move the edges from A to B
     *
     * Case 2: block A contains block B
     *         A :  [          ]
     *         B :      [    ]
     *    edge_b :            []
     *         In this case, the outgoing edges of A should not be moved to B.
     *         Instead, we need to follow the fallthrough edge of B to find a
     *         block (edge_b), which ends at same location as A. We then move
     *         outgoing edges of A to edge_b.
     * Case 3: End of A is smaller than the end of B
     *         A : [        ]
     *         B :      [       ]
     *         In this case, the outgoing edges of A should only contain a
     *         fallthrough edge (otherwise, B's end will the same as A).
     *         We remove this fall through edge for now and we will add the
     *         edge back in finalizing.
     *

   The same algorithm description is also documented in function
   Parser::move_edges_consistent_blocks(Block *A, Block *B) in parseAPI/src/Parser.C



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] e94542: More fixes for removing duplicated edges and wrong..., Xiaozhu Meng <=