scripts/trace.pl: Auto-detect tracepoint field order

Instead of hard-coding the order of key-value pairs into regular
expressions, auto-detect them as we go.

At the same time re-factor the code so it is smaller and even
slightly faster (10-15% by a quick measurement).

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
1 file changed