projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1304 from slluis/mac-proxy-autoconfig
[mono.git]
/
mono
/
profiler
/
proflog.c
diff --git
a/mono/profiler/proflog.c
b/mono/profiler/proflog.c
index 9021a00b24d846c71e4545f589437adad174050e..520b3b228d50d00633dd7956ec89d22e602d432b 100644
(file)
--- a/
mono/profiler/proflog.c
+++ b/
mono/profiler/proflog.c
@@
-831,10
+831,13
@@
walk_stack (MonoMethod *method, int32_t native_offset, int32_t il_offset, mono_b
* event, hence the collect_bt/emit_bt split.
*/
static void
* event, hence the collect_bt/emit_bt split.
*/
static void
-collect_bt (FrameData *data)
+collect_bt (FrameData *data
, gboolean async_safe
)
{
data->count = 0;
{
data->count = 0;
- mono_stack_walk_no_il (walk_stack, data);
+ if (async_safe)
+ mono_stack_walk_async_safe (walk_stack, data);
+ else
+ mono_stack_walk_no_il (walk_stack, data);
}
static void
}
static void
@@
-867,7
+870,7
@@
gc_alloc (MonoProfiler *prof, MonoObject *obj, MonoClass *klass)
len += 7;
len &= ~7;
if (do_bt)
len += 7;
len &= ~7;
if (do_bt)
- collect_bt (&data);
+ collect_bt (&data
, FALSE
);
logbuffer = ensure_logbuf (32 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "gcalloc");
logbuffer = ensure_logbuf (32 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "gcalloc");
@@
-1132,7
+1135,7
@@
throw_exc (MonoProfiler *prof, MonoObject *object)
FrameData data;
LogBuffer *logbuffer;
if (do_bt)
FrameData data;
LogBuffer *logbuffer;
if (do_bt)
- collect_bt (&data);
+ collect_bt (&data
, FALSE
);
logbuffer = ensure_logbuf (16 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "throw");
logbuffer = ensure_logbuf (16 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "throw");
@@
-1168,7
+1171,7
@@
monitor_event (MonoProfiler *profiler, MonoObject *object, MonoProfilerMonitorEv
FrameData data;
LogBuffer *logbuffer;
if (do_bt)
FrameData data;
LogBuffer *logbuffer;
if (do_bt)
- collect_bt (&data);
+ collect_bt (&data
, FALSE
);
logbuffer = ensure_logbuf (16 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "monitor");
logbuffer = ensure_logbuf (16 + MAX_FRAMES * 8);
now = current_time ();
ENTER_LOG (logbuffer, "monitor");
@@
-1230,7
+1233,7
@@
mono_sample_hit (MonoProfiler *profiler, unsigned char *ip, void *context)
if (in_shutdown)
return;
now = current_time ();
if (in_shutdown)
return;
now = current_time ();
- collect_bt (&bt_data);
+ collect_bt (&bt_data
, TRUE
);
elapsed = (now - profiler->startup_time) / 10000;
if (do_debug) {
int len;
elapsed = (now - profiler->startup_time) / 10000;
if (do_debug) {
int len;