-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[MONO] Add JIT_CODE_DEBUG_INFO record functionality for Jitdump #85107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
f015afa
9c1fdd7
bf53413
b8c7554
2abb0f4
c68edd6
202c5de
4b359cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -38,6 +38,7 @@ | |||||
#include <mono/metadata/threads.h> | ||||||
#include <mono/metadata/appdomain.h> | ||||||
#include <mono/metadata/debug-helpers.h> | ||||||
#include <mono/metadata/debug-internals.h> | ||||||
#include <mono/metadata/domain-internals.h> | ||||||
#include <mono/metadata/profiler-private.h> | ||||||
#include <mono/metadata/mono-config.h> | ||||||
|
@@ -2015,7 +2016,7 @@ static clockid_t clock_id = CLOCK_MONOTONIC; | |||||
|
||||||
enum { | ||||||
JIT_DUMP_MAGIC = 0x4A695444, | ||||||
JIT_DUMP_VERSION = 2, | ||||||
JIT_DUMP_VERSION = 1, | ||||||
#if HOST_X86 | ||||||
ELF_MACHINE = EM_386, | ||||||
#elif HOST_AMD64 | ||||||
|
@@ -2031,7 +2032,8 @@ enum { | |||||
#elif HOST_RISCV | ||||||
ELF_MACHINE = EM_RISCV, | ||||||
#endif | ||||||
JIT_CODE_LOAD = 0 | ||||||
JIT_CODE_LOAD = 0, | ||||||
JIT_DEBUG_INFO = 2 | ||||||
}; | ||||||
typedef struct | ||||||
{ | ||||||
|
@@ -2062,7 +2064,22 @@ typedef struct | |||||
// Null terminated function name | ||||||
// Native code | ||||||
} JitCodeLoadRecord; | ||||||
typedef struct | ||||||
{ | ||||||
guint64 code_addr; | ||||||
guint32 line; | ||||||
guint32 discrim; | ||||||
char name[]; | ||||||
}DebugEntry; | ||||||
typedef struct | ||||||
{ | ||||||
RecordHeader header; | ||||||
guint64 code_addr; | ||||||
guint64 nr_entry; | ||||||
DebugEntry debug_entry[]; | ||||||
}JitCodeDebug; | ||||||
|
}JitCodeDebug; | |
} JitCodeDebug; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static void add_basic_JitCodeDebug_info(JitCodeDebug *record); | |
static void add_basic_JitCodeDebug_info (JitCodeDebug *record); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In mono code base, we add a space between the function name and the "(". Please follow this function call style for all the code change in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should follow the mono coding conventions, see the rest of the file for examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. let me know if there is anything else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.