Abstract:This paper firstly presents an aspect-oriented call graph (ACG for short), then introduces an AspectJ dynamic advices weaving optimizing method based on the ACG (aspect-oriented call graph) of AspectJ programs. Our method firstly solves a call stack through the ACG and deduces the types of the nodes in the stack, then match the call stack with pointcuts, and finally decides how to weave dynamic advices based on the result of matching. A case study shows that this method has great precision and can identify most of weaving points statically.