}
#ifdef HAVE_SQLITE3
- if (!ev_decoder->stmt_dec_record) {
+ if (ras->record_events && !ev_decoder->stmt_dec_record) {
if (ras_mc_add_vendor_table(ras, &ev_decoder->stmt_dec_record,
&hip08_oem_type1_event_tab)
!= SQLITE_OK) {
}
#ifdef HAVE_SQLITE3
- if (!ev_decoder->stmt_dec_record) {
+ if (ras->record_events && !ev_decoder->stmt_dec_record) {
if (ras_mc_add_vendor_table(ras, &ev_decoder->stmt_dec_record,
&hip08_oem_type2_event_tab) != SQLITE_OK) {
trace_seq_printf(s,
}
#ifdef HAVE_SQLITE3
- if (!ev_decoder->stmt_dec_record) {
+ if (ras->record_events && !ev_decoder->stmt_dec_record) {
if (ras_mc_add_vendor_table(ras, &ev_decoder->stmt_dec_record,
&hip08_pcie_local_event_tab) != SQLITE_OK) {
trace_seq_printf(s,
enum hisi_oem_data_type data_type,
int id, int64_t data, const char *text)
{
+ if (ev_decoder->stmt_dec_record == NULL)
+ return;
+
switch (data_type) {
case HISI_OEM_DATA_TYPE_INT:
sqlite3_bind_int(ev_decoder->stmt_dec_record, id, data);
{
int rc;
+ if (ev_decoder->stmt_dec_record == NULL)
+ return 0;
+
rc = sqlite3_step(ev_decoder->stmt_dec_record);
if (rc != SQLITE_OK && rc != SQLITE_DONE)
log(TERM, LOG_ERR,