DataCollection.CommentMarkAtProfile 메서드

CommentMarkAtProfile 메서드는 .vsp 파일에 타임스탬프 값, 숫자 표시 및 주석 문자열을 삽입합니다.타임스탬프 값은 외부 이벤트의 동기화에 사용할 수 있습니다.표시와 주석을 삽입하려면 CommentMarkAtProfile 함수가 포함된 스레드의 프로파일링이 ON이어야 합니다.

네임스페이스:  Microsoft.VisualStudio.Profiler
어셈블리:  Microsoft.VisualStudio.Profiler(Microsoft.VisualStudio.Profiler.dll)

구문

‘선언
Public Shared Function CommentMarkAtProfile ( _
    timestamp As Long, _
    markId As Integer, _
    markText As String _
) As MarkOperationResult
public static MarkOperationResult CommentMarkAtProfile(
    long timestamp,
    int markId,
    string markText
)
public:
static MarkOperationResult CommentMarkAtProfile(
    long long timestamp, 
    int markId, 
    String^ markText
)
static member CommentMarkAtProfile : 
        timestamp:int64 * 
        markId:int * 
        markText:string -> MarkOperationResult 
public static function CommentMarkAtProfile(
    timestamp : long, 
    markId : int, 
    markText : String
) : MarkOperationResult

매개 변수

  • timestamp
    형식: System.Int64
    타임스탬프 값을 나타내는 64비트 정수입니다.
  • markId
    형식: System.Int32
    삽입할 숫자 마커입니다.마커는 0보다 크거나 같아야 합니다.
  • markText
    형식: System.String
    삽입할 텍스트 문자열에 대한 포인터입니다.문자열은 NULL 종결자를 포함하여 256자 미만이어야 합니다.

반환 값

형식: Microsoft.VisualStudio.Profiler.MarkOperationResult
반환 값 MarkOperationResult는 열거형입니다.

설명

Mark 명령 또는 API 함수(CommentMarkAtProfile, CommentMarkProfile 또는 MarkProfile)로 표시와 주석을 삽입할 때는 표시 프로필 함수가 포함된 스레드의 프로파일링 상태가 ON이어야 합니다.프로필 표시는 범위에서 전역적입니다.예를 들어, 한 스레드에 삽입된 프로필 표시를 사용하여 .vsp 파일의 임의 스레드에 있는 데이터 세그먼트의 시작 또는 끝을 표시할 수 있습니다.

중요중요

CommentMarkAtProfile 메서드는 계측에만 사용해야 합니다.

예제

다음 예제에서는 CommentMarkAtProfile 메서드 호출을 보여 줍니다.

        public void ExerciseCommentMarkAtProfile()
        {
            // Declare and initalize variables to pass to 
            // CommentMarkAtProfile.  The values of these 
            // parameters are assigned based on the needs 
            // of the code; and for the sake of simplicity
            // in this example, the variables are assigned
            // arbitrary values.
            long timestamp = 0x1111;
            int markId = 01;
            string markText = "Exercising CommentMarkAtProfile...";

            // Declare MarkOperationResult Enumerator.  
            // Holds return value from call to CommentMarkAtProfile.
            MarkOperationResult markResult;

            markResult = DataCollection.CommentMarkAtProfile(
                timestamp,
                markId,
                markText);

            // Check result of CommentMarkAtProfile call.
            Console.WriteLine("CommentMarkAtProfile returned {0}",
                markResult); 
        }

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DataCollection 클래스

Microsoft.VisualStudio.Profiler 네임스페이스