3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

internal_stats: astnode (sizeof)

This commit is contained in:
Emil J. Tywoniak 2024-09-11 11:34:20 +02:00
parent 17ee367c7b
commit 1372c47036
3 changed files with 10 additions and 0 deletions

View file

@ -25,6 +25,7 @@
#include "kernel/celltypes.h"
#include "passes/techmap/libparse.h"
#include "kernel/cost.h"
#include "frontends/ast/ast.h"
#include "libs/json11/json11.hpp"
#if defined(__APPLE__) && defined(__MACH__)
@ -105,6 +106,8 @@ struct InternalStatsPass : public Pass {
if (auto mem = current_mem_bytes()) {
log(" \"memory_now\": %s,\n", std::to_string(*mem).c_str());
}
auto ast_bytes = AST::astnode_count() * (unsigned long long) sizeof(AST::AstNode);
log(" \"memory_ast\": %s,\n", std::to_string(ast_bytes).c_str());
}
// stats go here