Skip to content
  • Marc Alff's avatar
    0078c465
    Bug#17493868 IMPROVE PERFORMANCE_SCHEMA MEMORY INSTRUMENTATION · 0078c465
    Marc Alff authored
    Before this fix,
    
    1)
    
    The memory instrumentation code could spent time performing
    operations in struct PFS_memory_stat
    
    2)
    
    Memory allocated internally by the performance schema
    was not reported by the performance schema memory instrumentation.
    
    With this fix,
    
    1)
    
    A new member, PFS_memory_stat::m_used, is added.
    This flags makes the code path much shorter.
    
    For cases when no memort instrumentation is enabled (the default),
    there are no stats to maintain.
    
    Even when the memory instrumentation is used, it is very unlikely that a 
    given session has statistics for every kind of memory instrument, so most 
    statistics will be unused.
    
    This is a performance improvement.
    
    2)
    
    A new instrument is added, named 
    "memory/performance_schema/internal_buffers".
    The performance schema now reports its own memory usage as well.
    0078c465
    Bug#17493868 IMPROVE PERFORMANCE_SCHEMA MEMORY INSTRUMENTATION
    Marc Alff authored
    Before this fix,
    
    1)
    
    The memory instrumentation code could spent time performing
    operations in struct PFS_memory_stat
    
    2)
    
    Memory allocated internally by the performance schema
    was not reported by the performance schema memory instrumentation.
    
    With this fix,
    
    1)
    
    A new member, PFS_memory_stat::m_used, is added.
    This flags makes the code path much shorter.
    
    For cases when no memort instrumentation is enabled (the default),
    there are no stats to maintain.
    
    Even when the memory instrumentation is used, it is very unlikely that a 
    given session has statistics for every kind of memory instrument, so most 
    statistics will be unused.
    
    This is a performance improvement.
    
    2)
    
    A new instrument is added, named 
    "memory/performance_schema/internal_buffers".
    The performance schema now reports its own memory usage as well.
Loading