Changeset c22a4bb


Ignore:
Timestamp:
04/30/18 13:54:55 (2 years ago)
Author:
Richard Sanger <rsanger@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
6d17620
Parents:
dc27de3
Message:

Return error if change perpkt threads on paused trace

We do not have code to change the number of perpkt threads, once
a trace had been started. However, you could set the perpkt threads
without an error being returned on a paused trace - but this never
got applied.

This clarifies docs and returns an error to match with the behaviour.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_parallel.h

    rc1205bd rc22a4bb  
    731731/** Set the maximum number of perpkt threads to use in a trace.
    732732 *
     733 * Only valid on a new trace, that has not be started. Once started
     734 * the number of threads cannot be changed without destroying the trace.
     735 *
    733736 * @param[in] trace The parallel input trace
    734737 * @param[in] nb The number of threads to use. If set to 0, libtrace will
  • lib/trace_parallel.c

    r7bdf6d1 rc22a4bb  
    24032403
    24042404DLLEXPORT int trace_set_perpkt_threads(libtrace_t *trace, int nb) {
    2405         if (!trace_is_configurable(trace)) return -1;
     2405        // Only supported on new traces not paused traces
     2406        if (trace->state != STATE_NEW) return -1;
    24062407
    24072408        /* TODO consider allowing an offset from the total number of cores i.e.
Note: See TracChangeset for help on using the changeset viewer.