Examples of addInstrumentationDescriptor()


Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Example1() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("test.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(this);
       
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Sample1() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(this);
       
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

       
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("test.callgraph");
        MethodEventProducer eventProducer = new MethodEventProducer(id);
        eventProducer.addMethodListener(monitor);
        ctx.addInstrumentationDescriptor(id);

        log.debug("creating a class loader");
        ClassLoader cl = InstrumentingClassLoader.createClassLoader(ctx);
       
        log.debug("loading classes");
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Sample2() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        // Events for field access
        FieldEventProducer fieldEventProducer = new FieldEventProducer(id);
        fieldEventProducer.addFieldListener(this);
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    id.addInclusionRule(iRule);
    if (eRule != null) {
        id.addExclusionRule(eRule);
    }

    ctx.addInstrumentationDescriptor(id);
     
    HotSpotAdvisor hsi =
        new HotSpotAdvisor(id, hsa, HotSpotAdvisor.INVOCATIONS,
               resolution);
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Sample3() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.event.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Use event API:
        // Events for field access
        FieldEventProducer fieldEventProducer = new FieldEventProducer(id);
        fieldEventProducer.addFieldListener(this);
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Sample1(String className) throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Associate interceptor with descriptor
        // Set resolution to 'foo*', which means that interceptor applies
        // its work only on invocations to methods which start with 'foo'
        InvocationInterceptor ii = new InvocationInterceptor(id, "samples*",this);
 
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

    public Sample2() throws Exception {
        // Configure:
        InstrumentationContext ctx = new InstrumentationContext();
        InstrumentationDescriptor id = new InstrumentationDescriptor();
        id.addInclusionRule("samples.*");
        ctx.addInstrumentationDescriptor(id);
       
        // Associate interceptor with descriptor
        // Set resolution to 'samples*', which means that interceptor applies
        // its work only on fields which start with 'samples'

View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

        // Events for method access
        MethodEventProducer methodEventProducer = new MethodEventProducer(mid);
        methodEventProducer.addMethodListener(this);

        // Add field and method descriptors to context
        ctx.addInstrumentationDescriptor(fid);
        ctx.addInstrumentationDescriptor(mid);


        Class c = InstrumentingClassLoader.createClassLoader(ctx).loadClass(args[0]);
        Method method = c.getMethod("main", new Class[] {String[].class});
View Full Code Here

Examples of alt.jiapi.InstrumentationContext.addInstrumentationDescriptor()

        MethodEventProducer methodEventProducer = new MethodEventProducer(mid);
        methodEventProducer.addMethodListener(this);

        // Add field and method descriptors to context
        ctx.addInstrumentationDescriptor(fid);
        ctx.addInstrumentationDescriptor(mid);


        Class c = InstrumentingClassLoader.createClassLoader(ctx).loadClass(args[0]);
        Method method = c.getMethod("main", new Class[] {String[].class});
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.