gcpy.profile.vtune_utils

Utilities for displaying reports generated by the Intel VTune profiler.

Functions

vtune_ask_user_to_continue_or_quit(header, ...)

Ask user if they wish to display more lines of VTune information to the screen, or if they wish to quit.

vtune_compare_a_hotspot(ref_file, ref_label, ...)

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

vtune_compare_a_hotspot_by_function(...)

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

vtune_compare_a_hotspot_by_line(ref_report, ...)

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

vtune_find_hotspot(report, column, hotspot_name)

Searches for a hotspot by name in a DataFrame column, Returns the relevant row of the DataFrame if found.

vtune_get_timing_info(ref_time, dev_time)

Computes timing information for a hotspot from two reports and returns a string for display.

vtune_how_is_report_grouped(report)

Determines how a VTune hotspot report is grouped.

vtune_list_all_hotspots(filename[, ...])

Reads a hotspots report (in CSV format) generated by the Intel VTune profiler, and calls the proper function to display the results.

vtune_list_all_hotspots_by_function(report)

Lists hotspots from an Intel VTune hotspot report that has been grouped by function.

vtune_list_all_hotspots_by_line(report[, ...])

Lists hotspots from an Intel VTune hotspot report that has been grouped by source code line.

vtune_read_hotspots_csv(filename[, delimiter])

Reads a hotspot report (in CSV format) generated by Intel VTune.

gcpy.profile.vtune_utils.vtune_read_hotspots_csv(filename, delimiter='\t')[source]

Reads a hotspot report (in CSV format) generated by Intel VTune.

Parameters:
  • filename (str) – Hotspots report in CSV format.

  • delimiter (str, optional) – Text separator. Default value: “t” (tab)

Returns:

report – DataFrame with hotspot information.

Return type:

pandas.DataFrame

gcpy.profile.vtune_utils.vtune_how_is_report_grouped(report)[source]

Determines how a VTune hotspot report is grouped.

Parameters:

report (pandas.DataFrame) – Hotspot report data.

Returns:

result – Returns ‘by_line’ or ‘by_function’.

Return type:

str

gcpy.profile.vtune_utils.vtune_ask_user_to_continue_or_quit(header, linecount, lines_per_screen)[source]

Ask user if they wish to display more lines of VTune information to the screen, or if they wish to quit.

Parameters:
  • header (str) – Header line for hotspot report.

  • linecount (int) – Index of the line being displayed.

  • lines_per_screen (int) – Pause after showing these many lines.

Returns:

result – True if user wishes to quit.

Return type:

bool

gcpy.profile.vtune_utils.vtune_list_all_hotspots_by_line(report, lines_per_screen=30)[source]

Lists hotspots from an Intel VTune hotspot report that has been grouped by source code line.

Parameters:
  • report (pandas.DataFrame) – Hotspot report from Intel VTune.

  • lines_per_screen (int, optional) – Pause after showing these many lines. Default value: LINES_PER_SCREEN

gcpy.profile.vtune_utils.vtune_list_all_hotspots_by_function(report, lines_per_screen=30)[source]

Lists hotspots from an Intel VTune hotspot report that has been grouped by function.

Parameters:
  • report (pandas.DataFrame) – Hotspot information data.

  • lines_per_screen (int, optional) – Pause after showing these many lines. Default value: LINES_PER_SCREEN

gcpy.profile.vtune_utils.vtune_list_all_hotspots(filename, delimiter='\t', lines_per_screen=30)[source]

Reads a hotspots report (in CSV format) generated by the Intel VTune profiler, and calls the proper function to display the results.

Parameters:
  • filename (str) – File containing the hotspot report.

  • delimiter (str, optional) – Text separator. Default value: “t” (tab)

  • lines_per_screen (int, optional) – Pause after showing these many lines. Default value: LINES_PER_SCREEN

gcpy.profile.vtune_utils.vtune_get_timing_info(ref_time, dev_time)[source]

Computes timing information for a hotspot from two reports and returns a string for display.

Parameters:
  • ref_time (str) – CPU Time [s] from the hotspot report for Ref.

  • dev_time (str) – CPU Time [s] from the hotspot report for Dev.

Returns:

time_str – String with timing information to display.

Return type:

str

gcpy.profile.vtune_utils.vtune_find_hotspot(report, column, hotspot_name)[source]

Searches for a hotspot by name in a DataFrame column, Returns the relevant row of the DataFrame if found.

Parameters:
  • report (pandas.DataFrame) – Hotspot report from Intel VTune.

  • column (str) – Column to search.

  • hotspot_name (str) – Name of the hotspot to look for.

Returns:

result – Modified DataFrame object.

Return type:

pandas.DataFrame

gcpy.profile.vtune_utils.vtune_compare_a_hotspot_by_line(ref_report, ref_label, dev_report, dev_label, hotspot_name, ref_line_number=None, dev_line_number=None)[source]

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

Parameters:
  • ref_report (pandas.DataFrame) – Hotspot report from the Ref model.

  • ref_label (str) – Label for the Ref model.

  • dev_report (pandas.DataFrame) – Hotspot report from the Dev model.

  • dev_label (str) – Label for the Dev model.

  • hotspot_name (str) – Name of the hotspot to search for.

  • ref_line_number (str or int or None, optional) – Line number where hotspot occurs in Ref. Default value: None

  • dev_line_number (str or int or None, optional) – Line number where hotspot occurs in Dev. Default value: None

gcpy.profile.vtune_utils.vtune_compare_a_hotspot_by_function(ref_report, ref_label, dev_report, dev_label, hotspot_name)[source]

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

Parameters:
  • ref_report (pandas.DataFrame) – Hotspot report from the Ref model.

  • ref_label (str) – Label for the Ref model.

  • dev_report (pandas.DataFrame) – Hotspot report from the Dev model.

  • dev_label (str) – Label for the Dev model.

  • hotspot_name (str) – Name of the hotspot to search for.

gcpy.profile.vtune_utils.vtune_compare_a_hotspot(ref_file, ref_label, dev_file, dev_label, hotspot_name, delimiter='\t', ref_line_number=None, dev_line_number=None)[source]

Compares a given hotspot in two different reports (grouped by source code line), and prints timing information.

Parameters:
  • ref_file (str) – Hotspot report from the Ref model.

  • ref_label (str) – Label for the Ref model.

  • dev_file (str) – Hotspot report from the Dev model.

  • dev_label (str) – Label for the Dev model.

  • hotspot_name (str) – Name of the hotspot to search for.

  • delimiter (str, optional) – Text separator. Default value: “t” (tab)

  • ref_line_number (str or int or None, optional) – Line number where hotspot occurs in Ref. Default value: None

  • dev_line_number (str or int or None, optional) – Line number where hotspot occurs in Dev. Default value: None