Skip to content

Commit 7fab943

Browse files
authored
Fix LTTng casing. (#5)
Fix LTTng casing. This should also likely resolve issue with WPA not being able to load extension (likely due to mixed casing in LTTngDataExtensions.deps.json)
1 parent 0bcf485 commit 7fab943

File tree

103 files changed

+533
-542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+533
-542
lines changed

CtfPlayback/CtfPlayback.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void Playback(
8484
if (streamPlayback.CurrentEvent.Timestamp.NanosecondsFromPosixEpoch < this.lastEventTimestamp)
8585
{
8686
Debug.Assert(false, "time inversion?");
87-
Console.Error.WriteLine("Time inversion discovered in Lttng trace.");
87+
Console.Error.WriteLine("Time inversion discovered in LTTng trace.");
8888
}
8989

9090
this.customization.ProcessEvent(

LttngCds/CookerData/ICursor.cs renamed to LTTngCds/CookerData/ICursor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
namespace LttngCds.CookerData
4+
namespace LTTngCds.CookerData
55
{
6-
//todo:do we need/want this interface? LttngContext might be enough
6+
//todo:do we need/want this interface? LTTngContext might be enough
77
public interface ICursor
88
{
99
/// <summary>

LTTngCds/CookerData/LTTngConstants.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
namespace LTTngCds.CookerData
4+
{
5+
public class LTTngConstants
6+
{
7+
/// <summary>
8+
/// Id of the LTTng source parser for use in data extensions.
9+
/// </summary>
10+
public const string SourceId = "LTTng";
11+
}
12+
}

LttngCds/CookerData/LttngContext.cs renamed to LTTngCds/CookerData/LTTngContext.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
using System.Collections.Generic;
66
using CtfPlayback.Inputs;
77
using CtfPlayback.Metadata.Interfaces;
8-
using LttngCds.CtfExtensions;
8+
using LTTngCds.CtfExtensions;
99

10-
namespace LttngCds.CookerData
10+
namespace LTTngCds.CookerData
1111
{
1212
/// <summary>
1313
/// Provides additional data beyond the event for event processing.
1414
/// </summary>
15-
public class LttngContext
15+
public class LTTngContext
1616
: ICursor
1717
{
18-
private readonly LttngMetadataCustomization metadata;
18+
private readonly LTTngMetadataCustomization metadata;
1919
private readonly ICtfInputStream eventStream;
2020
private readonly TraceContext traceContext;
2121

22-
internal LttngContext(LttngMetadataCustomization metadata, ICtfInputStream eventStream, TraceContext traceContext)
22+
internal LTTngContext(LTTngMetadataCustomization metadata, ICtfInputStream eventStream, TraceContext traceContext)
2323
{
2424
this.metadata = metadata;
2525
this.eventStream = eventStream;
2626
this.traceContext = traceContext;
2727
}
2828

2929
/// <summary>
30-
/// The clocks described in the LTTNG trace.
30+
/// The clocks described in the LTTng trace.
3131
/// </summary>
3232
public IReadOnlyDictionary<string, ICtfClockDescriptor> Clocks => this.metadata.Metadata.ClocksByName;
3333

LttngCds/CookerData/LttngEvent.cs renamed to LTTngCds/CookerData/LTTngEvent.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@
55
using CtfPlayback;
66
using CtfPlayback.EventStreams.Interfaces;
77
using CtfPlayback.FieldValues;
8-
using LttngCds.CtfExtensions.DescriptorInterfaces;
8+
using LTTngCds.CtfExtensions.DescriptorInterfaces;
99
using Microsoft.Performance.SDK;
1010
using Microsoft.Performance.SDK.Extensibility;
1111

12-
namespace LttngCds.CookerData
12+
namespace LTTngCds.CookerData
1313
{
1414
/// <summary>
15-
/// An LTTNG event
15+
/// An LTTng event
1616
/// </summary>
17-
public class LttngEvent
17+
public class LTTngEvent
1818
: IKeyedDataType<string>
1919
{
2020
private readonly ICtfEvent ctfEvent;
2121
private readonly IEventDescriptor eventDescriptor;
2222

23-
internal LttngEvent(ICtfEvent ctfEvent)
23+
internal LTTngEvent(ICtfEvent ctfEvent)
2424
{
2525
if (!(ctfEvent.EventDescriptor is IEventDescriptor eventDescriptor))
2626
{
27-
throw new CtfPlaybackException("Not a valid LTTNG event.");
27+
throw new CtfPlaybackException("Not a valid LTTng event.");
2828
}
2929

3030
if (ctfEvent.Payload is null)
3131
{
32-
throw new CtfPlaybackException("LTTNG event payload is null.");
32+
throw new CtfPlaybackException("LTTng event payload is null.");
3333
}
3434

3535
if (!(ctfEvent.Payload is CtfStructValue payload))
3636
{
37-
throw new CtfPlaybackException("LTTNG event payload is not a structure.");
37+
throw new CtfPlaybackException("LTTng event payload is not a structure.");
3838
}
3939

4040
this.ctfEvent = ctfEvent;

LttngCds/CtfExtensions/DescriptorInterfaces/IEventDescriptor.cs renamed to LTTngCds/CtfExtensions/DescriptorInterfaces/IEventDescriptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
using CtfPlayback.Metadata.Interfaces;
55

6-
namespace LttngCds.CtfExtensions.DescriptorInterfaces
6+
namespace LTTngCds.CtfExtensions.DescriptorInterfaces
77
{
88
/// <summary>
9-
/// LTTNG specific event information combined with CTF event information
9+
/// LTTng specific event information combined with CTF event information
1010
/// </summary>
1111
public interface IEventDescriptor
1212
: ICtfEventDescriptor

LttngCds/CtfExtensions/Descriptors/EventDescriptor.cs renamed to LTTngCds/CtfExtensions/Descriptors/EventDescriptor.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
using System.Collections.Generic;
55
using CtfPlayback.Metadata.TypeInterfaces;
6-
using LttngCds.CtfExtensions.DescriptorInterfaces;
6+
using LTTngCds.CtfExtensions.DescriptorInterfaces;
77

8-
namespace LttngCds.CtfExtensions.Descriptors
8+
namespace LTTngCds.CtfExtensions.Descriptors
99
{
1010
/// <summary>
1111
/// A definition of an event.
@@ -26,7 +26,7 @@ internal EventDescriptor(
2626

2727
if (!assignments.TryGetValue("name", out var name))
2828
{
29-
throw new LttngMetadataException("event descriptor is missing 'name' property.");
29+
throw new LTTngMetadataException("event descriptor is missing 'name' property.");
3030
}
3131
this.Name = string.Intern(name.Trim(new[] { '"' }));
3232

@@ -41,7 +41,7 @@ internal EventDescriptor(
4141

4242
public uint LogLevel { get; private set; }
4343

44-
// LTTNG defines no context for an event
44+
// LTTng defines no context for an event
4545

4646
public ICtfTypeDescriptor Context => null;
4747

@@ -60,12 +60,12 @@ private void SetId(IReadOnlyDictionary<string, string> assignments)
6060
{
6161
if (!assignments.TryGetValue("id", out var integerString))
6262
{
63-
throw new LttngMetadataException("event descriptor is missing 'id' property.");
63+
throw new LTTngMetadataException("event descriptor is missing 'id' property.");
6464
}
6565

6666
if (!uint.TryParse(integerString, out var id))
6767
{
68-
throw new LttngMetadataException($"event descriptor 'id' cannot be converted into a {this.Id.GetType()}.");
68+
throw new LTTngMetadataException($"event descriptor 'id' cannot be converted into a {this.Id.GetType()}.");
6969
}
7070

7171
this.Id = id;
@@ -75,12 +75,12 @@ private void SetStream(IReadOnlyDictionary<string, string> assignments)
7575
{
7676
if (!assignments.TryGetValue("stream_id", out var integerString))
7777
{
78-
throw new LttngMetadataException("event descriptor is missing 'stream_id' property.");
78+
throw new LTTngMetadataException("event descriptor is missing 'stream_id' property.");
7979
}
8080

8181
if (!int.TryParse(integerString, out var streamId))
8282
{
83-
throw new LttngMetadataException($"event descriptor 'stream_id' cannot be converted into a {this.Stream.GetType()}.");
83+
throw new LTTngMetadataException($"event descriptor 'stream_id' cannot be converted into a {this.Stream.GetType()}.");
8484
}
8585

8686
this.Stream = streamId;
@@ -100,7 +100,7 @@ private void SetLogLevel(IReadOnlyDictionary<string, string> assignments)
100100

101101
if (!uint.TryParse(integerString, out var logLevel))
102102
{
103-
throw new LttngMetadataException($"event descriptor 'loglevel' cannot be converted into a {this.Stream.GetType()}.");
103+
throw new LTTngMetadataException($"event descriptor 'loglevel' cannot be converted into a {this.Stream.GetType()}.");
104104
}
105105

106106
this.LogLevel = logLevel;
@@ -110,12 +110,12 @@ private void SetPayload(IReadOnlyDictionary<string, ICtfTypeDescriptor> typeDecl
110110
{
111111
if (!typeDeclarations.TryGetValue("fields", out var typeDescriptor))
112112
{
113-
throw new LttngMetadataException("event descriptor is missing 'fields' type assignment.");
113+
throw new LTTngMetadataException("event descriptor is missing 'fields' type assignment.");
114114
}
115115

116116
if (!(typeDescriptor is ICtfStructDescriptor payloadStruct))
117117
{
118-
throw new LttngMetadataException("event descriptor type 'fields' is not a structure.");
118+
throw new LTTngMetadataException("event descriptor type 'fields' is not a structure.");
119119
}
120120

121121
this.Payload = payloadStruct;

LttngCds/CtfExtensions/FolderInput/LttngFileInputStream.cs renamed to LTTngCds/CtfExtensions/FolderInput/LTTngFileInputStream.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using System.IO;
66
using CtfPlayback.Inputs;
77

8-
namespace LttngCds.CtfExtensions.FolderInput
8+
namespace LTTngCds.CtfExtensions.FolderInput
99
{
10-
internal sealed class LttngFileInputStream
10+
internal sealed class LTTngFileInputStream
1111
: ICtfInputStream
1212
{
13-
public LttngFileInputStream(string fileName)
13+
public LTTngFileInputStream(string fileName)
1414
{
1515
if (!File.Exists(fileName))
1616
{

LttngCds/CtfExtensions/FolderInput/LttngFolderInput.cs renamed to LTTngCds/CtfExtensions/FolderInput/LTTngFolderInput.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
using System.Linq;
99
using CtfPlayback.Inputs;
1010

11-
namespace LttngCds.CtfExtensions.FolderInput
11+
namespace LTTngCds.CtfExtensions.FolderInput
1212
{
13-
internal sealed class LttngFolderInput
13+
internal sealed class LTTngFolderInput
1414
: ICtfInput
1515
{
1616
private readonly List<ICtfTraceInput> traces = new List<ICtfTraceInput>();
1717

18-
public LttngFolderInput(string folderPath)
18+
public LTTngFolderInput(string folderPath)
1919
{
2020
if (!Directory.Exists(folderPath))
2121
{
@@ -26,9 +26,9 @@ public LttngFolderInput(string folderPath)
2626
foreach (var metadataFile in metadataFiles)
2727
{
2828
// each CTF trace is associated with one metadata stream and one or more event streams.
29-
var traceInput = new LttngFolderTraceInput
29+
var traceInput = new LTTngFolderTraceInput
3030
{
31-
MetadataStream = new LttngFileInputStream(metadataFile)
31+
MetadataStream = new LTTngFileInputStream(metadataFile)
3232
};
3333

3434
string traceDirectoryPath = Path.GetDirectoryName(metadataFile);
@@ -38,7 +38,7 @@ public LttngFolderInput(string folderPath)
3838
Path.GetFileName(entry).StartsWith("channel"));
3939

4040
traceInput.EventStreams = associatedEntries.Select(
41-
fileName => new LttngFileInputStream(fileName)).Cast<ICtfInputStream>().ToList();
41+
fileName => new LTTngFileInputStream(fileName)).Cast<ICtfInputStream>().ToList();
4242

4343
this.traces.Add(traceInput);
4444
}

LttngCds/CtfExtensions/FolderInput/LttngFolderTraceInput.cs renamed to LTTngCds/CtfExtensions/FolderInput/LTTngFolderTraceInput.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
using System.Collections.Generic;
55
using CtfPlayback.Inputs;
66

7-
namespace LttngCds.CtfExtensions.FolderInput
7+
namespace LTTngCds.CtfExtensions.FolderInput
88
{
9-
internal sealed class LttngFolderTraceInput
9+
internal sealed class LTTngFolderTraceInput
1010
: ICtfTraceInput
1111
{
1212
public ICtfInputStream MetadataStream { get; set; }

0 commit comments

Comments
 (0)