You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rewrite.txt 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Rewritten...
  2. [bcel] hundreds of classes removed, one class now represents groups of instructions rather than one class per instruction
  3. [bcel] verifier packaged separately purely for use by AspectJ tests, not delivered in aspectj packages now
  4. [weaver] optimized KindedAnnotationAccessVar - renamed to AnnotationAccessVar
  5. [weaver] simplified member/resolvedmember hierarchy - still more to do, trying to remove need for casts, we should *know* what we
  6. are dealing with at each point
  7. todo:
  8. [weaver]
  9. [bcel] remove notion of Gens entirely (LineNumberGen/LocalVariableGen) and switch fully to lighter way tags
  10. [weaver] activate 'assertGoodBody()' code through command line option to catch bugs in the field
  11. [weaver] is reweavable turned off when LTW?
  12. measure performance - lot of hash table things used to keep types lightweight unless they need the extra data - might be a better way?
  13. OPTIMIZE task tag marks places noticed on the way through where we could do better
  14. hierarchies to attack:
  15. ASTNode
  16. UnresolvedType (messy...)
  17. Member
  18. 28th April
  19. Looking at LazyMethodGen.pack() - 12% of the cpu usage for what we are testing. pack() is quite tricky to make better, wonder if we
  20. can differentiate amongst targeters to speed things up? Also instructionHandle has 'attributes' - for no good reason that I can see
  21. Removed static in BranchHandle...
  22. Performance analysis, following: http://java.sun.com/developer/technicalArticles/Programming/perfanal/
  23. Reveals of 5415 ticks (weaving rt.jar), we spend 25% of the time in WeaverAdapter.removeFromMap() !
  24. - changed that code to a CharOpt comparison
  25. - further changed to null 'lastReturnedResult' when it is finished with, should reduce ongoing calls
  26. - want to removeFromMap() quickly if we can. we can't usually because we have rebuilt the char array because
  27. post weave we build a new UnwovenClassFile() - I've changed the code to copy across the charname which
  28. means we can do remove() rather than searching all keys because the char array is the same one as what was
  29. used for the key when it was put in.
  30. knocks 25seconds (was 1 minute, now 35s) off the weave time
  31. --- Deliverable sizes: aspectjweaver.jar
  32. 1.6.0 = 1,907,848 bytes:1094 classes
  33. 26Apr = 1,718,083:893
  34. 26Apr = 1,618,024:849 (verifier removed from delivered package)
  35. 27Apr = 1,612,996:848
  36. ----------------
  37. Finally have a loadtime weaving test
  38. see - d:\e312\eclipse\plugins
  39. ltwToolsProto.bat
  40. of the 20seconds it takes for 1925 classes, 1.81% is:
  41. org.aspectj.weaver.tools.WeavingAdaptor.weaveClass: 57.5% (1142 inclusive / 0 exclusive)
  42. org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes: 49.14% (976 inclusive / 0 exclusive)
  43. org.aspectj.weaver.bcel.BcelWeaver.weave: 48.94% (972 inclusive / 11 exclusive)
  44. org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify: 45.37% (901 inclusive / 0 exclusive)
  45. org.aspectj.weaver.bcel.BcelWeaver.getClassFilesFor: 22% (437 inclusive / 0 exclusive)
  46. org.aspectj.weaver.bcel.LazyClassGen.getJavaClassBytesIncludingReweavable: 22% (437 inclusive / 0 exclusive)
  47. org.aspectj.weaver.bcel.LazyClassGen.writeBack: 17.88% (355 inclusive / 4 exclusive)
  48. org.aspectj.weaver.bcel.LazyMethodGen.getMethod: 17.42% (346 inclusive / 0 exclusive)
  49. org.aspectj.weaver.bcel.LazyMethodGen.pack: 13.09% (260 inclusive / 3 exclusive)
  50. org.aspectj.weaver.bcel.LazyMethodGen.newPackBody: 8.36% (166 inclusive / 81 exclusive)
  51. org.aspectj.apache.bcel.generic.InstructionList.delete: 1.31% (26 inclusive / 1 exclusive)
  52. 29Apr
  53. now the extra bytecode parse in UnwovenClassFile - can we get rid of it by using the ctor that supplies a classname?
  54. 2may
  55. looked at the analysis and getSourceLocation() was being called a lot - wasn't sure why given I didn't use tjp in the advice - turns
  56. out a dummy xrefhandler is added in LTWWorld, and so all the guards to avoid doing anything if there is no xrefhandler are worthless.
  57. fixed.
  58. noticed ClassParser ctor messing about remembering if the source is a zip and wrapping a baos in a bufferedinputstream - added new
  59. ctor to avoid that and removed the zip nonsense
  60. 2May = 1,588,317:841 but fails tests, buggerit