def run_buffer_analysis(trace, threshold):
    """
    Plot the buffer size distribution and big transactions.

    :param trace: input Trace object
    :type trace: :mod:`libs.utils.Trace`

    :param threshold: plot buffers larger than threshold
    :type threshold: int
    """
    df = trace.data_frame.alloc_df()
    trace.analysis.binder_transaction.plot_samples(df, "size",
                                                   "sample trace points",
                                                   "buffersize (bytes)")
    trace.analysis.binder_transaction.plot_tasks(df, threshold,
                                                 "__pid_x", "size",
                                                 "proc_id",
                                                 "buffersize (bytes)")
    return df