Author: Tobias Weber <[email protected]>
Branch: c8-overheads-instrumentation
Changeset: r2036:dccc8c8d7f65
Date: 2017-04-05 11:28 +0200
http://bitbucket.org/pypy/stmgc/changeset/dccc8c8d7f65/
Log: Instrument commit log entry creation
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -359,6 +359,8 @@
{
/* puts all modified_old_objects in a new commit log entry */
+ start_timer();
+
// we don't need the privatization lock, as we are only
// reading from modified_old_objs and nobody but us can change it
struct list_s *list = STM_PSEGMENT->modified_old_objects;
@@ -371,6 +373,9 @@
result->rev_num = -1; /* invalid */
result->written_count = count;
memcpy(result->written, list->items, count * sizeof(struct stm_undo_s));
+
+ stop_timer_and_publish(STM_DURATION_CREATE_CLE);
+
return result;
}
diff --git a/c8/stmgc.h b/c8/stmgc.h
--- a/c8/stmgc.h
+++ b/c8/stmgc.h
@@ -578,6 +578,7 @@
STM_DURATION_WRITE_GC_ONLY,
STM_DURATION_WRITE_SLOWPATH,
STM_DURATION_VALIDATION,
+ STM_DURATION_CREATE_CLE,
STM_DURATION_COMMIT_EXCEPT_GC,
STM_DURATION_MINOR_GC,
STM_DURATION_MAJOR_GC_LOG_ONLY,
@@ -602,6 +603,7 @@
"duration of gc due to write", \
"duration of write slowpath", \
"duration of validation", \
+ "duration of commit log entry creation", \
"duration of commit except gc", \
"duration of minor gc", \
"duration of major gc doing log clean up only", \
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit