| 
| 
  | KernelSamplesTarget (bool emitTrace=false, cstring name="Linux kernel"_cs) | 
|   | 
| cstring  | abortReturnCode () const override | 
|   | 
| 
void  | annotateTableWithBTF (Util::SourceCodeBuilder *builder, cstring name, cstring keyType, cstring valueType) const | 
|   | 
| cstring  | dataEnd (cstring base) const override | 
|   | 
| cstring  | dataLength (cstring base) const override | 
|   | 
| cstring  | dataOffset (cstring base) const override | 
|   | 
| cstring  | dropReturnCode () const override | 
|   | 
| void  | emitCodeSection (Util::SourceCodeBuilder *builder, cstring sectionName) const override | 
|   | 
| void  | emitIncludes (Util::SourceCodeBuilder *builder) const override | 
|   | 
| void  | emitLicense (Util::SourceCodeBuilder *builder, cstring license) const override | 
|   | 
| void  | emitMain (Util::SourceCodeBuilder *builder, cstring functionName, cstring argName) const override | 
|   | 
| void  | emitMapInMapDecl (Util::SourceCodeBuilder *builder, cstring innerName, TableKind innerTableKind, cstring innerKeyType, cstring innerValueType, unsigned innerSize, cstring outerName, TableKind outerTableKind, cstring outerKeyType, unsigned outerSize) const override | 
|   | 
| void  | emitPreamble (Util::SourceCodeBuilder *builder) const override | 
|   | 
| void  | emitResizeBuffer (Util::SourceCodeBuilder *builder, cstring buffer, cstring offsetVar) const override | 
|   | 
| void  | emitTableDecl (Util::SourceCodeBuilder *builder, cstring tblName, TableKind tableKind, cstring keyType, cstring valueType, unsigned size) const override | 
|   | 
| void  | emitTableDeclSpinlock (Util::SourceCodeBuilder *builder, cstring tblName, TableKind tableKind, cstring keyType, cstring valueType, unsigned size) const override | 
|   | 
| void  | emitTableLookup (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const override | 
|   | 
| void  | emitTableUpdate (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const override | 
|   | 
| void  | emitTraceMessage (Util::SourceCodeBuilder *builder, const char *format, int argc=0,...) const override | 
|   | 
| void  | emitUserTableUpdate (Util::SourceCodeBuilder *builder, cstring tblName, cstring key, cstring value) const override | 
|   | 
| cstring  | forwardReturnCode () const override | 
|   | 
| cstring  | packetDescriptorType () const override | 
|   | 
| cstring  | sysMapPath () const override | 
|   | 
| 
virtual void  | emitTraceMessage (Util::SourceCodeBuilder *builder, const char *format) const | 
|   | 
Represents a target that is compiled within the kernel. source tree samples folder and which attaches to a socket. 
 
  
  
      
        
          | void EBPF::KernelSamplesTarget::emitTraceMessage  | 
          ( | 
          Util::SourceCodeBuilder * |           builder,  | 
         
        
           | 
           | 
          const char * |           format,  | 
         
        
           | 
           | 
          int |           argc = 0,  | 
         
        
           | 
           | 
           |           ... ) const | 
         
       
   | 
  
overridevirtual   | 
  
 
Emit trace message which will be printed during packet processing (if enabled). 
- Parameters
 - 
  
    | builder | Actual source code builder.  | 
    | format | Format string, interpreted by printk-like function. For more information see documentation for bpf_trace_printk.  | 
    | argc | Number of variadic arguments. Up to 3 arguments can be passed due to limitation of eBPF.  | 
    | ... | Arguments to the format string, they must be C string and valid code in C. | 
  
   
To print variable value: emitTraceMessage(builder, "var=%u", 1, "var_name") To print expression value: emitTraceMessage(builder, "diff=%d", 1, "var1 - var2") To print just message: emitTraceMessage(builder, "Here") 
Reimplemented from EBPF::Target.