Package com.jitlogic.zorka.common.tracedata

Examples of com.jitlogic.zorka.common.tracedata.TraceRecord


     */
    private void pop() {

        boolean clean = true;

        TraceRecord parent = ttop.getParent();

        popException();


        // Submit data if trace marker found
        if (ttop.hasFlag(TraceRecord.TRACE_BEGIN)) {
            int flags = ttop.getMarker().getFlags();
            if ((ttop.getTime() >= ttop.getMarker().getMinimumTime() && 0 == (flags & TraceMarker.DROP_TRACE))
                    || 0 != (flags & TraceMarker.SUBMIT_TRACE)) {
                submit(ttop);
                AgentDiagnostics.inc(AgentDiagnostics.TRACES_SUBMITTED);
                clean = false;
            } else {
                AgentDiagnostics.inc(AgentDiagnostics.TRACES_DROPPED);
            }


            if (parent != null) {
                parent.getMarker().inheritFlags(ttop.getMarker().getFlags());
            }
        }

        // Determine how the top of stack should be rolled back
        if (parent != null) {
            if ((ttop.getTime() > Tracer.getMinMethodTime() || ttop.getErrors() > 0)
                    || 0 != (ttop.getMarker().getFlags() & TraceMarker.ALL_METHODS)) {


                if (!ttop.hasFlag(TraceRecord.OVERFLOW_FLAG)) {
                    reparentTop(parent);

                } else {
                    parent.getMarker().markFlags(TraceMarker.OVERFLOW_FLAG);
                }
                clean = false;
            }
            parent.setCalls(parent.getCalls() + ttop.getCalls());
            parent.setErrors(parent.getErrors() + ttop.getErrors());
        }


        if (clean) {
            ttop.clean();
            numRecords--;
        } else {
            if (parent != null) {
                ttop = parent;
            } else {
                ttop = new TraceRecord(null);
                numRecords = 0;
            }
        }

    }
View Full Code Here


        Object val = type == FIELD_GETTING_PROCESSOR ? record.get(srcVal)
                : ObjectInspector.substitute(srcVal, record);

        if (val != null) {
            if (ZorkaLogger.isLogLevel(ZorkaLogger.ZSP_ARGPROC)) {
                TraceRecord top = tracer.getHandler().realTop();
                log.debug(ZorkaLogger.ZSP_ARGPROC, "Value: '" + val + "' stored as trace attribute "
                        + symbolRegistry.symbolName(attrId) + " (classId= " + top.getClassId() + " methodId=" + top.getMethodId()
                        + " signatureId=" + top.getSignatureId() + ")");
            }
            tracer.getHandler().newAttr(traceId, attrId, attrTagId != null ? new TaggedValue(attrTagId, val) : val);
        } else {
            if (ZorkaLogger.isLogLevel(ZorkaLogger.ZSP_ARGPROC)) {
                log.debug(ZorkaLogger.ZSP_ARGPROC, "Null value received. ");
View Full Code Here

    private void reparentTop(TraceRecord parent) {
        // Drop interim record if necessary
        if (ttop.getMarker().hasFlag(TraceMarker.DROP_INTERIM) && ttop.isInterimDroppable()
                && ttop.getTime() - ttop.getChild(0).getTime() < Tracer.getMinMethodTime()) {
            TraceRecord child = ttop.getChild(0);
            child.setCalls(ttop.getCalls());
            child.setErrors(ttop.getErrors());
            child.markFlag(TraceRecord.DROPPED_PARENT);
            numRecords--;
            parent.addChild(child);
        } else {
            parent.addChild(ttop);
        }
View Full Code Here

     * have no effect.
     *
     * @param minimumTraceTime (in nanoseconds)
     */
    public void setMinimumTraceTime(long minimumTraceTime) {
        TraceRecord top = realTop();
        if (top.inTrace()) {
            top.getMarker().setMinimumTime(minimumTraceTime);
        }
    }
View Full Code Here

        Object obj = instantiate(agentInstance.getClassTransformer(), TCLASS1);
        invoke(obj, "trivialMethod");

        assertEquals("should return begin, trace", 1, results.size());
        TraceRecord rec = results.get(0);
        assertEquals(sym(TCLASS1), rec.getClassId());
        assertEquals(sym("TEST"), rec.getTraceId());
        assertEquals(1, rec.getCalls());
    }
View Full Code Here

        Object obj = instantiate(agentInstance.getClassTransformer(), TCLASS1);
        invoke(obj, "trivialStrMethod", "BUMBUM");
        assertEquals("should return begin, trace", 1, results.size());

        TraceRecord rec = results.get(0);
        assertEquals(sym(TCLASS1), rec.getClassId());
        assertEquals(sym("BUMBUM"), rec.getTraceId());
        assertEquals(1, rec.getCalls());
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.common.tracedata.TraceRecord

Copyright © 2018 www.massapicom. 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.