Changing verbosity of `uvm_info messages

Hi All ,
1] Macro `uvm_info is defined as

`define uvm_info(ID,MSG,VERBOSITY) \
   begin \
     if (uvm_report_enabled(VERBOSITY,UVM_INFO,ID)) \
       uvm_report_info (ID, MSG, VERBOSITY, `uvm_file, `uvm_line); \
     end
// Calls uvm_report_info if ~VERBOSITY~ is lower than the configured verbosity of the associated reporter.

[Q1] Does function ‘uvm_report_enabled’ return the verbosity associated with the module / interface / component / object ?

2] I observe that function ‘uvm_report_enabled’ is defined in multiple files ::

  1. uvm_globals.svh ( when `uvm_info called within a module / interface
  2. uvm_report_object.svh ( when `uvm_info called within a component )
  3. uvm_sequence_item.svh ( when `uvm_info called within a user_sequence / user_sequence_item )

[Q2] Do these functions perform the same job or is there a difference b/w the 3 functions ?

[Q3] If a user were to call uvm_report_info directly then does the user have run-time control over the messages via run-time arguments +UVM_VERBOSTY= [OR] +uvm_set_verbosity= ?

uvm_report_enabled is defined in uvm_report_object. The other definitions are wrappers to use the context of either the uvm_root object, or the uvm_sequencer a sequence_item is running on. Both of these objects are derived from uvm_report_object.

From the UVM documentation, uvm_report_enabled returns 1 (true)

if the configured verbosity for this severity/id is greater than or equal to verbosity else returns 0.

This was an attempted performance optimization because sometimes the MSG argument was a complex chain of function calls (e.g. to the UVM printer methods). The macro adds a quick check so that the MSG argument does not get evaluated if the report does not get printed. However, the call to uvm_report_info is going to do the same check again.