IMPALA-6296: Avoid crash caused by DCHECK in Codegen in debug mode
IMPALA-6296: Avoid crash caused by DCHECK in Codegen in debug mode

Currently, when debug mode is enabled, any query using codegen can result
in an Impala daemon crash as it hits a DCHECK.

This patch ensures the DCHECK is hit only when specific condition is met to
avoid the crash. That condition here is to DCHECK only when 'emit_perf_map_'
evaluates to True ensuring 'perf_map_lock_' is not empty when asserted.

Change-Id: I93e2b1efb325100d01d398e68e789d87b877167e
Reviewed-on: http://gerrit.cloudera.org:8080/8923
Reviewed-by: Tim Armstrong <2f8e34250f03a653da3dc27f7ec203eafdde80fc@cloudera.com>
Reviewed-by: Thomas Tauber-Marshall <55b5d0aded728f7a3075d2dcc6abf84f96c36406@cloudera.com>
Tested-by: Impala Public Jenkins

cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala