mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Merge pull request #4595 from YosysHQ/emil/internal_stats-astnode
internal_stats: astnode (sizeof)
This commit is contained in:
commit
34572708d5
3 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue