LCOV - code coverage report
Current view: top level - app/firedancer - main.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 3 20 15.0 %
Date: 2025-08-05 05:04:49 Functions: 1 2 50.0 %

          Line data    Source code
       1             : #include "topology.h"
       2             : #include "config.h"
       3             : #include "../shared/boot/fd_boot.h"
       4             : #include "../shared/commands/configure/configure.h"
       5             : 
       6             : char const * FD_APP_NAME    = "Firedancer";
       7             : char const * FD_BINARY_NAME = "firedancer";
       8             : 
       9             : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
      10             : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
      11             : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
      12             : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
      13             : extern fd_topo_obj_callbacks_t fd_obj_cb_opaque;
      14             : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
      15             : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
      16             : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
      17             : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
      18             : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
      19             : extern fd_topo_obj_callbacks_t fd_obj_cb_runtime_pub;
      20             : extern fd_topo_obj_callbacks_t fd_obj_cb_store;
      21             : extern fd_topo_obj_callbacks_t fd_obj_cb_fec_sets;
      22             : extern fd_topo_obj_callbacks_t fd_obj_cb_txncache;
      23             : extern fd_topo_obj_callbacks_t fd_obj_cb_exec_spad;
      24             : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
      25             : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
      26             : extern fd_topo_obj_callbacks_t fd_obj_cb_bank_hash_cmp;
      27             : 
      28             : fd_topo_obj_callbacks_t * CALLBACKS[] = {
      29             :   &fd_obj_cb_mcache,
      30             :   &fd_obj_cb_dcache,
      31             :   &fd_obj_cb_fseq,
      32             :   &fd_obj_cb_metrics,
      33             :   &fd_obj_cb_opaque,
      34             :   &fd_obj_cb_dbl_buf,
      35             :   &fd_obj_cb_neigh4_hmap,
      36             :   &fd_obj_cb_fib4,
      37             :   &fd_obj_cb_keyswitch,
      38             :   &fd_obj_cb_tile,
      39             :   &fd_obj_cb_runtime_pub,
      40             :   &fd_obj_cb_store,
      41             :   &fd_obj_cb_fec_sets,
      42             :   &fd_obj_cb_txncache,
      43             :   &fd_obj_cb_exec_spad,
      44             :   &fd_obj_cb_banks,
      45             :   &fd_obj_cb_funk,
      46             :   &fd_obj_cb_bank_hash_cmp,
      47             :   NULL,
      48             : };
      49             : 
      50             : configure_stage_t * STAGES[] = {
      51             :   &fd_cfg_stage_hugetlbfs,
      52             :   &fd_cfg_stage_sysctl,
      53             :   &fd_cfg_stage_hyperthreads,
      54             :   &fd_cfg_stage_ethtool_channels,
      55             :   &fd_cfg_stage_ethtool_gro,
      56             :   &fd_cfg_stage_ethtool_loopback,
      57             :   &fd_cfg_stage_snapshots,
      58             :   NULL,
      59             : };
      60             : 
      61             : 
      62             : extern fd_topo_run_tile_t fd_tile_net;
      63             : extern fd_topo_run_tile_t fd_tile_netlnk;
      64             : extern fd_topo_run_tile_t fd_tile_sock;
      65             : extern fd_topo_run_tile_t fd_tile_quic;
      66             : extern fd_topo_run_tile_t fd_tile_verify;
      67             : extern fd_topo_run_tile_t fd_tile_dedup;
      68             : extern fd_topo_run_tile_t fd_tile_pack;
      69             : extern fd_topo_run_tile_t fd_tile_resolv;
      70             : extern fd_topo_run_tile_t fd_tile_shred;
      71             : extern fd_topo_run_tile_t fd_tile_sign;
      72             : extern fd_topo_run_tile_t fd_tile_metric;
      73             : extern fd_topo_run_tile_t fd_tile_cswtch;
      74             : extern fd_topo_run_tile_t fd_tile_gui;
      75             : extern fd_topo_run_tile_t fd_tile_plugin;
      76             : extern fd_topo_run_tile_t fd_tile_bundle;
      77             : 
      78             : extern fd_topo_run_tile_t fd_tile_gossip;
      79             : extern fd_topo_run_tile_t fd_tile_repair;
      80             : extern fd_topo_run_tile_t fd_tile_replay;
      81             : extern fd_topo_run_tile_t fd_tile_execor;
      82             : extern fd_topo_run_tile_t fd_tile_writer;
      83             : extern fd_topo_run_tile_t fd_tile_poh;
      84             : extern fd_topo_run_tile_t fd_tile_send;
      85             : extern fd_topo_run_tile_t fd_tile_tower;
      86             : extern fd_topo_run_tile_t fd_tile_rpcserv;
      87             : 
      88             : fd_topo_run_tile_t * TILES[] = {
      89             :   &fd_tile_net,
      90             :   &fd_tile_netlnk,
      91             :   &fd_tile_sock,
      92             :   &fd_tile_quic,
      93             :   &fd_tile_verify,
      94             :   &fd_tile_dedup,
      95             :   &fd_tile_pack,
      96             :   &fd_tile_resolv,
      97             :   &fd_tile_shred,
      98             :   &fd_tile_sign,
      99             :   &fd_tile_metric,
     100             :   &fd_tile_cswtch,
     101             :   &fd_tile_gui,
     102             :   &fd_tile_plugin,
     103             :   &fd_tile_bundle,
     104             :   &fd_tile_gossip,
     105             :   &fd_tile_repair,
     106             :   &fd_tile_replay,
     107             :   &fd_tile_execor,
     108             :   &fd_tile_writer,
     109             :   &fd_tile_poh,
     110             :   &fd_tile_send,
     111             :   &fd_tile_tower,
     112             :   &fd_tile_rpcserv,
     113             :   NULL,
     114             : };
     115             : 
     116             : extern action_t fd_action_run;
     117             : extern action_t fd_action_run1;
     118             : extern action_t fd_action_configure;
     119             : extern action_t fd_action_monitor;
     120             : extern action_t fd_action_keys;
     121             : extern action_t fd_action_ready;
     122             : extern action_t fd_action_mem;
     123             : extern action_t fd_action_netconf;
     124             : extern action_t fd_action_set_identity;
     125             : extern action_t fd_action_help;
     126             : extern action_t fd_action_version;
     127             : 
     128             : action_t * ACTIONS[] = {
     129             :   &fd_action_run,
     130             :   &fd_action_run1,
     131             :   &fd_action_configure,
     132             :   &fd_action_monitor,
     133             :   &fd_action_keys,
     134             :   &fd_action_ready,
     135             :   &fd_action_mem,
     136             :   &fd_action_netconf,
     137             :   &fd_action_set_identity,
     138             :   &fd_action_help,
     139             :   &fd_action_version,
     140             :   NULL,
     141             : };
     142             : 
     143             : int
     144             : main( int     argc,
     145          12 :       char ** argv ) {
     146          12 :   return fd_main( argc, argv, 1, (char const *)firedancer_default_config, firedancer_default_config_sz, fd_topo_initialize );
     147          12 : }
     148             : 
     149             : /* Kind of a hack for now, we sometimes want to view bench generation
     150             :    in the monitor binary, but it's not part of the production binary. */
     151             : 
     152             : void
     153             : add_bench_topo( fd_topo_t  * topo,
     154             :                 char const * affinity,
     155             :                 ulong        benchg_tile_cnt,
     156             :                 ulong        benchs_tile_cnt,
     157             :                 ulong        accounts_cnt,
     158             :                 int          transaction_mode,
     159             :                 float        contending_fraction,
     160             :                 float        cu_price_spread,
     161             :                 ulong        conn_cnt,
     162             :                 ushort       send_to_port,
     163             :                 uint         send_to_ip_addr,
     164             :                 ushort       rpc_port,
     165             :                 uint         rpc_ip_addr,
     166             :                 int          no_quic,
     167           0 :                 int          reserve_agave_cores ) {
     168           0 :   (void)topo;
     169           0 :   (void)affinity;
     170           0 :   (void)benchg_tile_cnt;
     171           0 :   (void)benchs_tile_cnt;
     172           0 :   (void)accounts_cnt;
     173           0 :   (void)transaction_mode;
     174           0 :   (void)contending_fraction;
     175           0 :   (void)cu_price_spread;
     176           0 :   (void)conn_cnt;
     177           0 :   (void)send_to_port;
     178           0 :   (void)send_to_ip_addr;
     179           0 :   (void)rpc_port;
     180           0 :   (void)rpc_ip_addr;
     181           0 :   (void)no_quic;
     182           0 :   (void)reserve_agave_cores;
     183           0 : }

Generated by: LCOV version 1.14