Skip to content

Commit 0a8693b

Browse files
committed
put gc sequence number in gcs table
1 parent 3357d56 commit 0a8693b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vm/moar/HLL/Backend.nqp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,10 @@ class HLL::Backend::MoarVM {
317317
elsif $k eq 'gcs' {
318318
for $v -> $gc {
319319
my @g := nqp::list_s();
320-
for <time retained_bytes promoted_bytes gen2_roots full responsible cleared_bytes start_time> -> $f {
320+
for <time retained_bytes promoted_bytes gen2_roots full responsible cleared_bytes start_time sequence> -> $f {
321321
nqp::push_s(@g, ~($gc{$f} // '0'));
322322
}
323+
nqp::push_s(@g, ~$thread<thread>);
323324
$profile_fh.say('INSERT INTO gcs VALUES (' ~ nqp::join(',', @g) ~ ');');
324325
}
325326
}
@@ -404,6 +405,7 @@ class HLL::Backend::MoarVM {
404405
$profile_fh.say('CREATE TABLE types(id INTEGER PRIMARY KEY ASC, name TEXT);');
405406
$profile_fh.say('CREATE TABLE routines(id INTEGER PRIMARY KEY ASC, name TEXT, line INT, file TEXT);');
406407
$profile_fh.say('CREATE TABLE gcs(time INT, retained_bytes INT, promoted_bytes INT, gen2_roots INT, full INT, responsible INT, cleared_bytes INT, start_time INT);');
408+
$profile_fh.say('CREATE TABLE gcs(time INT, retained_bytes INT, promoted_bytes INT, gen2_roots INT, full INT, responsible INT, cleared_bytes INT, start_time INT, sequence_num INT, thread_id INT);');
407409
$profile_fh.say('CREATE TABLE calls(id INTEGER PRIMARY KEY ASC, parent_id INT, routine_id INT, osr INT, spesh_entries INT, jit_entries INT, inlined_entries INT, inclusive_time INT, exclusive_time INT, entries INT, deopt_one INT, deopt_all INT, rec_depth INT, FOREIGN KEY(routine_id) REFERENCES routines(id));');
408410
$profile_fh.say('CREATE TABLE profile(total_time INT, spesh_time INT, thread_id INT, root_node INT, FOREIGN KEY(root_node) REFERENCES calls(id));');
409411
$profile_fh.say('CREATE TABLE allocations(call_id INT, type_id INT, spesh INT, jit INT, count INT, PRIMARY KEY(call_id, type_id), FOREIGN KEY(call_id) REFERENCES calls(id), FOREIGN KEY(type_id) REFERENCES types(id));');

0 commit comments

Comments
 (0)