Skip to content
Tom Barbette edited this page Aug 6, 2018 · 1 revision

click-devirtualize

removes virtual function calls from a Click configuration

Synopsis

click-devirtualize [options] [param=value ...] [router-file]

Description

The click-devirtualize tool speeds up a Click configuration by removing virtual function calls from its elements. It reads a router configuration file in the click language and creates specialized C++ source code for each element. The virtual function calls in this specialized C++ code are replaced with direct function calls to other elements in the configuration.

After creating the source code, click-devirtualize will optionally compile it into dynamically loadable packages. The elements in the input configuration are changed to use new, specially generated element classes, and the resulting configuration, plus source code and any compiled packages, are combined into an archive and written to the standard output. You can install such an archive into the click.o Linux kernel module with click-install:

  % click-devirtualize -k CONFIGURATION | click-install
The

click user level driver can read the archives directly.

The click-devirtualize transformation can be reversed with the --reverse option.

Options

If any filename argument is a single dash "-", click-devirtualize will use the standard input or output instead, as appropriate.

  • -f file

  • --file file

    Read the router configuration to transform from file. The default is the standard input.

  • -e expr

  • --expr expr

    Use expr, a string in the Click language, as the router configuration to transform.

  • -o file

  • --output file

    Write the output router configuration to file. The default is the standard output.

  • -l, --linuxmodule

    Generate a dynamically loadable package for the click.o Linux kernel module.

  • -u, --userlevel

    Generate a dynamically loadable package for the click user-level driver.

  • -s, --source

    Output only the specialized element class source code.

  • -c, --config

    Output only the new configuration (the one that includes specialized elements).

  • -r, --reverse

    Reverse the tranformation. That is, change any existing devirtualized element classes into the equivalent normal elements.

  • -n class

  • --no-devirtualize class

    Do not devirtualize elements whose element class is class. Such elements will continue using normal source code.

  • -i file

  • --instructions file

    Read devirtualization instructions from file. This file can contain any number of lines. Comments start with ‘#’; non-blank, non-comment lines should have devirtualization directives. There is currently one directive: "noclass class1 class2..." is equivalent to several ‘--no-devirtualize classi’ options.

  • --help

    Print usage information and exit.

  • --version

    Print the version number and some quickie warranty information and exit.

See Also

click, click-install, click, click.o

Author

Eddie Kohler, [email protected]
https://github.com/tbarbette/fastclick

Clone this wiki locally