• Nick Gasson's avatar
    perf jvmti: Do not report error when missing debug information · 959f8ed4
    Nick Gasson authored
    If the Java sources are compiled with -g:none to disable debug
    information the perf JVMTI plugin reports a lot of errors like:
    
      java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION
      java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION
      java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION
      java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION
      java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION
    
    Instead if GetLineNumberTable returns JVMTI_ERROR_ABSENT_INFORMATION
    simply skip emitting line number information for that method. Unlike the
    previous patch these errors don't affect the jitdump generation, they
    just generate a lot of noise.
    
    Similarly for native methods which also don't have line tables.
    Signed-off-by: default avatarNick Gasson <nick.gasson@arm.com>
    Reviewed-by: default avatarIan Rogers <irogers@google.com>
    Tested-by: default avatarIan Rogers <irogers@google.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lore.kernel.org/lkml/20200427061520.24905-3-nick.gasson@arm.com
    [ Moved || operator to the end of the line, not at the start of 2nd if condition ]
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    959f8ed4
libjvmti.c 11.3 KB