Skip to content

Commit

Permalink
JfrStackFrame adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mgronlun committed Feb 8, 2020
1 parent 320b3f8 commit 5ec05aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.cpp
Expand Up @@ -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),
Expand Down Expand Up @@ -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++;
}
Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.hpp
Expand Up @@ -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;
Expand Down

0 comments on commit 5ec05aa

Please sign in to comment.