Skip to content
Permalink
Browse files

JfrStackFrame adjustment

  • Loading branch information
mgronlun committed Feb 8, 2020
1 parent 320b3f8 commit 5ec05aa2d546f01d06fec6d2b9cf6f97e97d7c2b
@@ -44,10 +44,10 @@ static void copy_frames(JfrStackFrame** lhs_frames, u4 length, const JfrStackFra
}

JfrStackFrame::JfrStackFrame(const traceid& id, int bci, int type, const InstanceKlass* ik) :
_klass(ik), _method(NULL), _methodid(id), _line(0), _bci(bci), _type(type) {}
_klass(ik), _methodid(id), _line(0), _bci(bci), _type(type) {}

JfrStackFrame::JfrStackFrame(const traceid& id, int bci, int type, int lineno, const Method* method, const InstanceKlass* ik) :
_klass(ik), _method(method), _methodid(id), _line(lineno), _bci(bci), _type(type) {}
JfrStackFrame::JfrStackFrame(const traceid& id, int bci, int type, int lineno, const InstanceKlass* ik) :
_klass(ik), _methodid(id), _line(lineno), _bci(bci), _type(type) {}

JfrStackTrace::JfrStackTrace(JfrStackFrame* frames, u4 max_frames) :
_next(NULL),
@@ -297,7 +297,7 @@ bool JfrStackTrace::record(JavaThread* jt, const frame& frame, int skip, bool as
}
// Can we determine if it's inlined?
_hash = (_hash << 2) + (unsigned int)(((size_t)mid >> 2) + (bci << 4) + type);
_frames[count] = JfrStackFrame(mid, bci, type, async_mode ? method->line_number_from_bci(bci) : 0, method, method->method_holder());
_frames[count] = JfrStackFrame(mid, bci, type, async_mode ? method->line_number_from_bci(bci) : 0, method->method_holder());
vfs.next_vframe();
count++;
}
@@ -33,21 +33,19 @@ class InstanceKlass;
class JavaThread;
class JfrCheckpointWriter;
class JfrChunkWriter;
class Method;

class JfrStackFrame {
friend class ObjectSampleCheckpoint;
private:
const InstanceKlass* _klass;
const Method* _method;
traceid _methodid;
mutable int _line;
int _bci;
u1 _type;

public:
JfrStackFrame(const traceid& id, int bci, int type, const InstanceKlass* klass);
JfrStackFrame(const traceid& id, int bci, int type, int lineno, const Method* method, const InstanceKlass* klass);
JfrStackFrame(const traceid& id, int bci, int type, int lineno, const InstanceKlass* klass);

bool equals(const JfrStackFrame& rhs) const;
void write(JfrChunkWriter& cw) const;

0 comments on commit 5ec05aa

Please sign in to comment.
You can’t perform that action at this time.