Skip to content

Commit

Permalink
put gc sequence number in gcs table
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Feb 18, 2018
1 parent 3357d56 commit 0a8693b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vm/moar/HLL/Backend.nqp
Expand Up @@ -317,9 +317,10 @@ class HLL::Backend::MoarVM {
elsif $k eq 'gcs' {
for $v -> $gc {
my @g := nqp::list_s();
for <time retained_bytes promoted_bytes gen2_roots full responsible cleared_bytes start_time> -> $f {
for <time retained_bytes promoted_bytes gen2_roots full responsible cleared_bytes start_time sequence> -> $f {
nqp::push_s(@g, ~($gc{$f} // '0'));
}
nqp::push_s(@g, ~$thread<thread>);
$profile_fh.say('INSERT INTO gcs VALUES (' ~ nqp::join(',', @g) ~ ');');
}
}
Expand Down Expand Up @@ -404,6 +405,7 @@ class HLL::Backend::MoarVM {
$profile_fh.say('CREATE TABLE types(id INTEGER PRIMARY KEY ASC, name TEXT);');
$profile_fh.say('CREATE TABLE routines(id INTEGER PRIMARY KEY ASC, name TEXT, line INT, file TEXT);');
$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);');
$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);');
$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));');
$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));');
$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));');
Expand Down

0 comments on commit 0a8693b

Please sign in to comment.